home *** CD-ROM | disk | FTP | other *** search
/ Software Vault: The Gold Collection / Software Vault - The Gold Collection (American Databankers) (1993).ISO / cdr02 / sfs20b.zip / SFDOC.TXT < prev    next >
Text File  |  1993-07-04  |  560KB  |  11,802 lines

  1.  
  2.     Surefire S2.0 User's Guide                                       Page 1
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.  
  16.  
  17.                                Surefire User's Guide
  18.                                    Surefire S2.0
  19.                              Copyright 1993 Piaf, Inc.
  20.                                 All Rights Reserved
  21.  
  22.  
  23.  
  24.  
  25.  
  26.  
  27.  
  28.       This  copy  of  Surefire  is shareware. This means that you may use your
  29.       copy  of Surefire, free of charge, for a trial period of 30 days. If you
  30.       decide  to  continue  using Surefire you must order a registered copy of
  31.       the  product. The registered version of Surefire provides you with phone
  32.       support, a 475 page illustrated User's Guide, a spell checker and memory
  33.       management for up to 8Mb on 286 machines or better.
  34.  
  35.       Since  shareware is freely distributed it makes it convenient for you to
  36.       try software before you buy it, while at the same time, the price of the
  37.       registered version can be kept considerably lower than comparable retail
  38.       software.   But the authors do not get paid until you order a registered
  39.       version.  Support  the  continued  development  of  Surefire. Order your
  40.       registered copy!
  41.  
  42.  
  43.  
  44.                                      Piaf, Inc.
  45.                                  3918 Orchard Court
  46.                               Boulder, CO  80304  USA
  47.  
  48.                                    303 786-8222.
  49.  
  50.  
  51.  
  52.  
  53.  
  54.  
  55.  
  56.  
  57.  
  58.  
  59.                           Copyright (c) 1993 Piaf, Inc.
  60.  
  61.     Surefire S2.0 User's Guide                                       Page 2
  62.  
  63.       Surefire User's Guide         -            Table of Contents
  64.  
  65.     Chapter 1:  Introduction                                    12
  66.          What is a Smart Document                               13
  67.          Chapter Preview                                        14
  68.  
  69.     Chapter 2:  Getting Started                                 15
  70.          Running Surefire                                       15
  71.               Running Surefire with a Document                  16
  72.          Leaving Surefire                                       16
  73.          System Information                                     16
  74.          System Setup                                           16
  75.               Current Drive and Directory                       16
  76.               Current Printer and Printer Port                  17
  77.               Using Your Display                                17
  78.               Document Related Parameters                       18
  79.               Tab Size                                          18
  80.               Word Wrap                                         18
  81.               Auto Calc                                         18
  82.               Hints                                             18
  83.               Auto Backup                                       18
  84.          The Surefire Demo/Tutorial                             19
  85.  
  86.     Chapter 3:  Getting Around                                  20
  87.          The Document                                           20
  88.          The Page Display                                       20
  89.          Menus                                                  20
  90.               The Menu Bar                                      20
  91.               Choosing a Menu Item                              21
  92.               Accelerated Menu Selection                        21
  93.               Inactive Menu Items                               22
  94.          Shortcuts                                              22
  95.          Windows                                                22
  96.          Window Fields                                          22
  97.               Data Entry Fields                                 22
  98.               Action Buttons                                    23
  99.               Multiple Choice Buttons                           23
  100.               Logical Choice Buttons                            23
  101.               Moving Between Fields                             23
  102.               Changing Logical and Multiple Choice Buttons      23
  103.               Choosing Action Buttons                           23
  104.          Getting Help                                           24
  105.               The Status Line                                   24
  106.               Hints                                             24
  107.               Context Help                                      25
  108.               Document Help                                     25
  109.          Using the Mouse                                        25
  110.              General Terms                                      25
  111.              The Mouse Buttons                                  25
  112.              Mouse Cursor vs Page Cursor                        25
  113.              Menu Selection                                     26
  114.              Clicking on the Menu                               26
  115.              Dragging on the Menu                               26
  116.  
  117.  
  118.                           Copyright (c) 1993 Piaf, Inc.
  119.  
  120.     Surefire S2.0 User's Guide                                       Page 3
  121.  
  122.          Using the Mouse in System Windows                      27
  123.              Choosing a Button                                  27
  124.              Changing Values of Multiple Choice Buttons         27
  125.              Toggling Logical Fields                            27
  126.              Selecting a Field                                  27
  127.              Choosing Files from the Directory List             27
  128.              Using Wildcards with the Directory Listing         28
  129.              Closing a System Window without Action             28
  130.          Using the Hint Line                                    28
  131.          Scrolling Your Document                                28
  132.          Scrolling a Pop-list                                   28
  133.  
  134.     Chapter 4:  Typing Text                                     29
  135.          Word Processors -vs- Typewriters                       29
  136.          Creating a New Document                                30
  137.          Saving Your Document                                   30
  138.          Cursor Movement                                        30
  139.          Entering Text                                          31
  140.          "Wrapped" and "Unwrapped" Paragraphs                   32
  141.          Typeover and Insert modes                              32
  142.               Using Typeover Mode                               32
  143.               Using Insert Mode                                 32
  144.          Deleting Characters                                    33
  145.          Exiting Surefire                                       33
  146.  
  147.     Chapter 5:  Revising a Document                             34
  148.          Opening a Document                                     34
  149.          Printing a Document                                    35
  150.               Preparation                                       35
  151.               Printing                                          36
  152.          Scrolling                                              36
  153.               Scrolling by Lines, Screens and Pages             37
  154.          Two Faces of Editing                                   38
  155.          "Scroll and Change" Editing                            38
  156.               Moving the Cursor on the Screen                   38
  157.          Changing Text                                          39
  158.               Removing Text                                     39
  159.               Adding Text                                       40
  160.               Adding and Deleting Lines                         40
  161.          Good Editing Practices                                 40
  162.  
  163.     Chapter 6:  Locating Text                                   41
  164.          Finding Text                                           41
  165.               Finding Capitalized and Whole Words               41
  166.          Using Goto                                             42
  167.          Using Replace                                          42
  168.          Locating Text Using Bookmarks                          43
  169.  
  170.     Chapter 7:  Clipboard Editing                               45
  171.          The Clipboard                                          45
  172.          Clipboard Commands                                     45
  173.          Selecting Text                                         46
  174.               Block Select -vs- Line Select                     46
  175.               Selecting a Region with Block Select              46
  176.  
  177.                           Copyright (c) 1993 Piaf, Inc.
  178.  
  179.     Surefire S2.0 User's Guide                                       Page 4
  180.  
  181.               Selecting Sentences with Line Select              47
  182.               Return to Normal Operations                       47
  183.               Canceling a Selection                             48
  184.          Selection with the Mouse                               48
  185.               Block Selection                                   48
  186.               Line Selection                                    49
  187.          Viewing Clipboard Objects                              49
  188.          Copying Text                                           50
  189.          Moving Text                                            51
  190.          Pasting Text                                           52
  191.               Paste & Keep                                      53
  192.          Sizing Clipboard Objects                               53
  193.          Removing Text                                          54
  194.          Recovering Text                                        55
  195.          Using the Mouse to Hide/Unhide an Object               55
  196.          Switching Among Clipboard Objects with the Mouse       55
  197.          Moving a Clipboard Object with the Mouse               55
  198.  
  199.     Chapter 8:  Adding Emphasis                                 56
  200.          Character Attributes                                   56
  201.               Giving a Character Attribute to Text              57
  202.          Special Characters                                     57
  203.          Indenting Lines and Paragraphs                         57
  204.          Drawing Boxes and Lines                                58
  205.               Using a Mouse                                     58
  206.          Constructing Tables                                    59
  207.          Text Alignment                                         59
  208.               Left Justification                                60
  209.               Right Justification                               60
  210.               Centering Text                                    60
  211.               Left/Right Text Alignment                         60
  212.  
  213.     Chapter 9:  Page Layout                                     61
  214.          Formatting Choices                                     61
  215.          Changing Character Spacing                             62
  216.          Changing Printers                                      64
  217.          Rewrapping Paragraphs                                  65
  218.          What is a Paragraph?                                   65
  219.          Changing Margins                                       65
  220.          Page Breaks                                            66
  221.          Adding and Deleting Pages                              67
  222.          Headers and Footers                                    68
  223.               Automatic Page Numbering                          68
  224.          Page and Paper Sizes                                   68
  225.          Printing Your Document                                 70
  226.  
  227.     Chapter 10:  The Calculator                                 71
  228.          Mathematical Expressions                               71
  229.          Using Functions                                        72
  230.          Calculator Errors                                      73
  231.          Pasting a Result                                       73
  232.  
  233.  
  234.  
  235.  
  236.                           Copyright (c) 1993 Piaf, Inc.
  237.  
  238.     Surefire S2.0 User's Guide                                       Page 5
  239.  
  240.     Chapter 11:  Introduction to Fields                         74
  241.          Fields and Forms                                       74
  242.          Editing and Using Documents                            74
  243.          Moving Around a Document via Fields                    75
  244.               Cursor Tied To Fields                             75
  245.               Free Cursor                                       76
  246.          Creating Fields                                        76
  247.          Sizing Text and Numeric Fields                         77
  248.          Field IDs                                              77
  249.  
  250.     Chapter 12:  Field Types and Attributes                     78
  251.          Format Attributes                                      78
  252.          Data Attributes                                        78
  253.          Text Fields                                            79
  254.               Justified Text Formats                            79
  255.               Unjustified Text Formats                          79
  256.               Single vs Multiple Lines                          79
  257.          Numeric Fields                                         79
  258.               Numeric Appearance                                80
  259.               Negative Representation                           80
  260.               Numeric Justification                             80
  261.               Other Numeric Format Settings                     80
  262.               Single vs Multiple Cells                          81
  263.          Date Fields                                            81
  264.               Date Styles                                       81
  265.               Default to Today                                  82
  266.          Logical Fields                                         82
  267.          Button Fields                                          82
  268.          Fixed vs Auto Sized Fields                             83
  269.  
  270.     Chapter 13:  Working With Fields                            84
  271.          Editing Fields                                         84
  272.          Single vs Multiple Line Fields                         85
  273.          Modifying Field Attributes                             85
  274.          Resizing Fields                                        85
  275.          Deleting Fields                                        86
  276.          Editing a Document with Fields as Text                 86
  277.          Moving and Copying Fields                              86
  278.          Entering Information into Fields                       87
  279.               Entering Dates                                    88
  280.          Pop-Lists                                              89
  281.               Creating a Pop-List                               89
  282.               Using a Pop-List                                  89
  283.          Clearing Field Values                                  90
  284.          Locating Specific Field Values                         90
  285.          Printing a Document with Fields                        90
  286.          Copying and Pasting Values Among Fields                91
  287.          Copying and Pasting Values To the Calculator           91
  288.          Using the Mouse with Document Fields                   91
  289.               Toggling Logical Fields                           91
  290.               Selecting a Field                                 92
  291.               Selecting a Button                                92
  292.  
  293.  
  294.  
  295.                           Copyright (c) 1993 Piaf, Inc.
  296.  
  297.     Surefire S2.0 User's Guide                                       Page 6
  298.  
  299.               Text Field Pop-lists                              92
  300.               Scrolling a Pop-list                              92
  301.               Creating Text and Numeric Fields                  93
  302.               Resizing Text and Numeric Fields                  93
  303.          Rapid Fire Editing with Keys and Mouse                 93
  304.  
  305.     Chapter 14: Introducing Field Commands                      94
  306.          What is a Field Command?                               94
  307.          What Can Be Done with Field Commands?                  95
  308.          Field IDs                                              95
  309.          Specifying Commands                                    96
  310.               Entering Field Commands                           96
  311.               Executing Field Commands                          96
  312.          Specifying Functions                                   96
  313.  
  314.     Chapter 15:  Using Field Commands                           98
  315.          Viewing and Editing Field Commands                     98
  316.               IDs and Names                                     98
  317.               Viewing Field Commands                            99
  318.               Editing Field Commands                            99
  319.               Pasting Values From the Calculator               100
  320.          IDs and References                                    100
  321.               Ranges                                           101
  322.               Numeric Fields                                   101
  323.               Sum of Numbers                                   101
  324.               Text Fields                                      102
  325.          Tracing References                                    103
  326.          Assignment Statements                                 103
  327.               Implicit Assignment                              103
  328.               Explicit Assignment to a Field                   104
  329.               Assignment to a Range of Cells                   104
  330.          Multiple Statements                                   104
  331.          Operating with Numbers                                104
  332.          Operating with Text                                   105
  333.          Conditions and Logical Expressions                    106
  334.               Logical Operators                                106
  335.               Complex Logical Expressions                      107
  336.               Logical Condition Function                       107
  337.          Control Operations                                    108
  338.               Errors in Control Functions                      108
  339.               Document Levels                                  108
  340.               Changing Directories                             108
  341.          More About Command Execution                          109
  342.               Automatic Command Execution                      109
  343.               Explicit Execution by Page or Document           109
  344.               Execution by Buttons                             110
  345.               Execute on Enter                                 110
  346.               Order of Execution                               110
  347.               Command Errors                                   110
  348.          Scrolling the Command Edit Area with the Mouse        111
  349.  
  350.  
  351.  
  352.  
  353.  
  354.                           Copyright (c) 1993 Piaf, Inc.
  355.  
  356.     Surefire S2.0 User's Guide                                       Page 7
  357.  
  358.     Chapter 16:  Spreadsheets                                  112
  359.          Creating a Spreadsheet                                112
  360.          Using a Spreadsheet                                   112
  361.          Absolute and Relative References                      112
  362.          Loading Commands with Relative References             113
  363.          Vertical and Horizontal Relative References           113
  364.               Absolute/Relative Toggle Key                     114
  365.          Enlarging a Spreadsheet                               115
  366.          Using a Range of Fields                               115
  367.               Selecting a Range of Fields                      115
  368.               Copy Commands Using Range Selection              116
  369.          Horizontal vs Vertical Execution Order                116
  370.          Selecting Fields with the Mouse                       116
  371.  
  372.     Chapter 17:  Introduction to Databases                     117
  373.          Storing Data                                          117
  374.               Specifying a Database Field                      117
  375.               Database Limits                                  118
  376.               Adding a Data Record                             118
  377.          Clearing All Fields                                   119
  378.          Simple Data Search                                    119
  379.               Viewing All Records                              119
  380.               Database Status Information                      119
  381.               Getting Specific Records                         120
  382.          Updating a Data Record                                120
  383.          Deleting a Data Record                                121
  384.          Displaying the First and Last Records                 121
  385.  
  386.     Chapter 18:  Searching a Database                          122
  387.          Specifying a Query                                    122
  388.               Query Lines                                      123
  389.               Sort Order Multiple Choice Button                123
  390.               Sort Direction Multiple Choice Button            123
  391.               Field Name and Type                              124
  392.               Condition Multiple Choice Button                 124
  393.               Single Conditions                                124
  394.               The 'All' Condition                              125
  395.               Range Conditions                                 125
  396.               Adding a Query Line                              126
  397.               AND'ed Conditions                                126
  398.               OR'ed Conditions                                 126
  399.               Deleting a Query Line                            127
  400.          Closing the Query Window                              127
  401.          Clearing the Current Query                            127
  402.          Setting Search Options                                127
  403.               Setting the  Record Type                         128
  404.          Named Queries                                         128
  405.               Saving a Query                                   128
  406.               Getting a Query                                  129
  407.               Running a Query                                  129
  408.               Deleting a Query                                 129
  409.          Scrolling the Query Window with the Mouse             130
  410.  
  411.  
  412.  
  413.                           Copyright (c) 1993 Piaf, Inc.
  414.  
  415.     Surefire S2.0 User's Guide                                       Page 8
  416.  
  417.     Chapter 19: Sharing Data Among Documents                   131
  418.          Base Documents vs Projected Documents                 131
  419.          Projected Fields                                      132
  420.               Projecting Fields Using the Clipboard            132
  421.               Projection as a Field Attribute                  133
  422.               Using Projected Fields vs Original Fields        133
  423.          Searching in a Projected Document                     133
  424.          Printing Your Data                                    134
  425.               Printing the Current Record                      134
  426.               Printing All Qualifying Records                  135
  427.  
  428.     Chapter 20: Forms and Form Letters                         136
  429.          What You Need to Know                                 136
  430.               Documents with Fields and No Database            137
  431.               Documents with Stored Fields                     137
  432.               Documents with Projected Fields                  138
  433.          Mailing Labels                                        138
  434.               Printing Mailing Labels                          139
  435.          Envelopes                                             140
  436.          Form Letters                                          140
  437.          Pre-Printed Forms                                     141
  438.  
  439.     Chapter 21:  Advanced Database Topics                      142
  440.          Changing the Database Structure                       142
  441.          Using Calculated Fields                               143
  442.          Using Hidden Fields                                   144
  443.          Using Database Searching Functions                    145
  444.          Recalling a Deleted Record                            146
  445.          Manipulating Record Sets                              147
  446.               Updating a Record Set                            147
  447.               Deleting a Record Set                            147
  448.               Recalling a Record Set                           148
  449.          Importing and Exporting Data                          148
  450.               Importing Data                                   149
  451.               Exporting Data                                   151
  452.               Merging and Extracting Surefire Databases        151
  453.          Joining Two Databases                                 152
  454.          Duplicate Records                                     152
  455.               Duplicate Record Checking During Import          153
  456.          The Persistent Counter                                154
  457.  
  458.     Chapter 22:  Generating Reports                            155
  459.          Formatting the Report                                 155
  460.               Specifying Repeated Fields                       156
  461.               Using Trim                                       157
  462.               Clearing the Repeat Specification                157
  463.               Displaying at the Top or Bottom of Pages         157
  464.               Displaying at the End of a Report                157
  465.               Displaying When a Sort Field Changes             158
  466.               Turning off Report Formatting                    158
  467.  
  468.  
  469.  
  470.  
  471.  
  472.                           Copyright (c) 1993 Piaf, Inc.
  473.  
  474.     Surefire S2.0 User's Guide                                       Page 9
  475.  
  476.          Generating a Report                                   159
  477.          Resetting a Report                                    160
  478.          Printing a Report                                     160
  479.               Printing After Display                           161
  480.               Printing the Report Directly                     161
  481.          Saving a Report                                       161
  482.          Using Statistical Database Functions                  162
  483.          Generating Reports at the Push of a Button            162
  484.          Multiple Field Selection with the Mouse               163
  485.  
  486.     Chapter 23:  More About Printing                           164
  487.          The Print Window                                      164
  488.               Pages to Print                                   164
  489.               Page Numbering                                   164
  490.               Number of Copies                                 165
  491.               Pause Before Printing                            165
  492.               PRINT and SEARCH & PRINT                         165
  493.          Printing the Current Document                         166
  494.          Stopping and Starting the Printer                     166
  495.          Printers and Printer Drivers                          166
  496.          What Actually Gets Printed                            168
  497.          Print or Search & Print to a File                     170
  498.  
  499.     Chapter 24:  More About Surefire Documents                 171
  500.          The Modes of Editing and Using Documents              171
  501.          Getting Documents                                     171
  502.          Saving Documents                                      173
  503.          Copying Documents                                     173
  504.          Renaming Documents                                    174
  505.          Deleting Documents                                    174
  506.          Creating a New Document                               175
  507.          Protecting Documents                                  175
  508.          Specifying Document Help                              175
  509.               Help File Format                                 176
  510.               Specifying a Document Help Context               177
  511.          Using Wild Cards in the Directory Listing             177
  512.          Changing the Drive and Directory from DOS             178
  513.  
  514.     Chapter 25:  Surefire System Topics                        179
  515.          Backing Up Your Files                                 179
  516.               Manual Backups                                   179
  517.               Automatic File Backup and Recovery               179
  518.          Surefire Files                                        180
  519.               Document File Format - WordStar Compatible       181
  520.               Database File Format - DBase III Compatible      181
  521.               Locking Documents                                181
  522.          System Constraints                                    182
  523.          Internationalization Features                         183
  524.               In the Setup Window                              183
  525.               In the Format Window                             183
  526.               Using International Keyboards                    183
  527.               Date Formats                                     183
  528.  
  529.  
  530.  
  531.                           Copyright (c) 1993 Piaf, Inc.
  532.  
  533.     Surefire S2.0 User's Guide                                       Page 10
  534.  
  535.     Appendix A:  Surefire Function Reference                   184
  536.          General Mathematical Functions                        184
  537.          Absolute Value                                        184
  538.          Integer Value                                         184
  539.          Remainder                                             184
  540.          Rounding                                              184
  541.          Square Root                                           184
  542.          Trigonometric Functions                               185
  543.          Pi                                                    185
  544.          Sine                                                  185
  545.          Cosine                                                185
  546.          Tangent                                               185
  547.          Logarithmic Functions                                 185
  548.          Logarithm                                             185
  549.          Power of e                                            185
  550.          Natural Logarithm                                     185
  551.          Financial Functions                                   186
  552.          Future Value                                          186
  553.          Payment Amounts                                       186
  554.          Present Value                                         186
  555.          Compound Growth Rate                                  186
  556.          Statistical Functions                                 186
  557.          Average                                               186
  558.          Count                                                 186
  559.          Maximum                                               187
  560.          Minimum                                               187
  561.          Sum                                                   187
  562.          Standard Deviation                                    187
  563.          Variance                                              187
  564.          Date Functions                                        187
  565.          Add Days to a Date                                    188
  566.          Date is After?                                        188
  567.          Date is Before?                                       188
  568.          Specify a Date                                        188
  569.          Day of Month                                          188
  570.          Find Days between Dates                               188
  571.          Month of Year                                         189
  572.          Dates are Same?                                       189
  573.          Subtract Days from a Date                             189
  574.          Today's Date                                          189
  575.          Year                                                  189
  576.          Text of a Date                                        189
  577.          Text of a Month                                       190
  578.          Text of a Day                                         190
  579.          Text Functions                                        190
  580.          Find a String                                         190
  581.          Obtain a String                                       190
  582.          Replace a String                                      191
  583.          Obtain Length of String                               191
  584.          Remove Trailing Blanks                                191
  585.          Compare Two Strings                                   191
  586.          Force String to Upper Case                            191
  587.          Force String to Lower Case                            191
  588.          Convert a Number to a String                          191
  589.  
  590.                           Copyright (c) 1993 Piaf, Inc.
  591.  
  592.     Surefire S2.0 User's Guide                                       Page 11
  593.  
  594.          Put String to a Page                                  192
  595.          Text Buffer Functions                                 192
  596.          Copy Text to Buffer                                   192
  597.          Paste Buffer onto Page                                192
  598.          Copy Text from Field to Buffer                        192
  599.          Paste Buffer into Field                               193
  600.          Time Functions                                        193
  601.          Current Time                                          193
  602.          Time Stamp                                            193
  603.          Control Functions                                     193
  604.          Go To a Page                                          194
  605.          Go To a Field                                         194
  606.          Go To a Document                                      194
  607.          Return to Previous Document                           194
  608.          Return to Document at Level                           195
  609.          Run a DOS Command                                     195
  610.          Reset the Document                                    195
  611.          Set Help Context                                      195
  612.          Present a Document                                    196
  613.          Database Statistical Functions                        196
  614.          Database Search Functions                             197
  615.          Set Query Conditions                                  197
  616.          Execute a Query                                       198
  617.          Join a Document                                       198
  618.          Start a Search                                        198
  619.          Update  Record                                        198
  620.          Logical Value Functions                               199
  621.          Logical Condition Function                            199
  622.  
  623.  
  624.  
  625.  
  626.  
  627.  
  628.  
  629.  
  630.  
  631.  
  632.  
  633.  
  634.  
  635.  
  636.  
  637.  
  638.  
  639.  
  640.  
  641.  
  642.  
  643.  
  644.  
  645.  
  646.  
  647.  
  648.  
  649.                           Copyright (c) 1993 Piaf, Inc.
  650.  
  651.     Surefire S2.0 User's Guide                                       Page 12
  652.  
  653.     Chapter 1      -    INTRODUCTION
  654.  
  655.          We have developed Surefire to help you do a wide variety of tasks
  656.     in the office and at home. Whether you want to track expenses, send
  657.     timely correspondence, or keep information about all your clients,
  658.     employees or favorite recipes, Surefire can meet your needs.
  659.  
  660.          You will find that Surefire is easy to use and easy to understand.
  661.     Menus and windows guide you through all of its features. Help is
  662.     available when and where you need it.  And you know at all times what
  663.     your printed text will look like without special formatting and viewing
  664.     procedures.
  665.  
  666.          The power of Surefire can be learned and incorporated in stages.
  667.     Your use and knowledge of Surefire will grow as you discover new ways to
  668.     automate various tasks. Through reading this manual and exploring the
  669.     Surefire system, you will gradually learn new powerful concepts. Once
  670.     you learn to do an operation, the methods for performing that operation
  671.     are the same no matter how complex your use becomes.
  672.  
  673.          This manual presents the concepts of Surefire so you can easily
  674.     build upon what you know from one stage to the next. As you read this
  675.     manual, you should take time to understand the concepts that are
  676.     presented in each chapter. It is not necessary to read each chapter
  677.     completely before moving on, but understanding the key concepts will
  678.     make understanding subsequent chapters easier.
  679.  
  680.          When you register your copy of Surefire, you will receive a nicely
  681.     bound printed Surefire User's Guide. This guide is loaded with
  682.     illustrations and step-by-step practices and has a complete index for
  683.     finding topics of interest quickly. Doing the practices will enable you
  684.     to benefit the most from the unique capabilities of Surefire.
  685.  
  686.          In order that you can have a vision of what Surefire is about
  687.     before you begin, we are going to introduce the notion of Smart
  688.     Documents. The Smart Document is what makes Surefire unique.
  689.  
  690.  
  691.  
  692.  
  693.  
  694.  
  695.  
  696.  
  697.  
  698.  
  699.  
  700.  
  701.  
  702.  
  703.  
  704.  
  705.  
  706.  
  707.  
  708.                           Copyright (c) 1993 Piaf, Inc.
  709.  
  710.     Surefire S2.0 User's Guide                                       Page 13
  711.  
  712.     What is a Smart Document
  713.  
  714.          Normally, word processing features are used to edit and manipulate
  715.     text. Once the text has been typed into your document, you could print
  716.     it for yourself or others to read. But what if your document did some
  717.     things for you automatically? Or better yet, what if you could interact
  718.     with your document?
  719.  
  720.          Suppose you were writing a letter. Your letter would probably have
  721.     your company letterhead and other information pertinent to you. However,
  722.     every time you write another letter you need to check your calendar so
  723.     that you can type the correct date. Having each new letter automatically
  724.     start with today's date would let you spend more time putting your
  725.     thoughts into your letter.
  726.  
  727.          Or, have you ever filled out a travel expense form at the end of a
  728.     long week and found out that the figures did not add up? No matter how
  729.     carefully you added the amounts, all of your daily totals did not equal
  730.     all the totals for the weekly categories. Frustrating time-wasters like
  731.     this can be eliminated if you could teach the computer to make these
  732.     routine calculations.
  733.  
  734.          With Surefire, you can put intelligence into your textual
  735.     documents. When you do this, you create Smart Documents.  Surefire
  736.     builds upon your knowledge of word processing to allow you to
  737.     incorporate spreadsheet and database management features directly within
  738.     your documents. A Smart Document can be a data entry or retrieval form,
  739.     an expense report, a contact database, a profit and loss statement or a
  740.     job estimate. In fact, a Smart Document can be almost any application
  741.     for which a spreadsheet or database program is used.  What's more, a
  742.     Smart Document can contain "buttons" to perform specific actions. And,
  743.     Smart documents can be linked together to build sophisticated custom
  744.     applications.
  745.  
  746.          Automatically dating your letter and setting up an expense report
  747.     are two simple examples of Smart documents. But Surefire's power and
  748.     flexibility go far beyond that! On the following page is an example of
  749.     two smart documents that could be part of a larger application. One of
  750.     the documents is an organizational chart that shows the reporting
  751.     hierarchy at a company. The other is an example of the phone list of all
  752.     employees at that company. The phone list may be viewed by "pressing" a
  753.     button on the ORG chart. In this case, pressing the "Full Directory"
  754.     button will give the company phone list while pressing the "VP
  755.     Marketing" button will display a list of all the employees reporting to
  756.     Joan Lindle.
  757.  
  758.           A Smart Document can be used as a fill-in-the-blank form. Take a
  759.     standard property lease for example. Generally, a lease has blank spaces
  760.     which will eventually hold information such as the names of the tenant
  761.     and landlord, the rent due each month and the required damage deposit.
  762.     With Surefire, you could enter the standard text of the lease once and
  763.     allow Surefire to quickly guide you through the blank areas to fill in
  764.  
  765.  
  766.  
  767.                           Copyright (c) 1993 Piaf, Inc.
  768.  
  769.     Surefire S2.0 User's Guide                                       Page 14
  770.  
  771.     the missing information each time a new lease is needed. In addition,
  772.     this information can be stored so you can quickly find a lease for a
  773.     particular tenant or all leases starting in a particular month.
  774.  
  775.          Perhaps you have trouble sorting your friends from your business
  776.     associates in your little black address book, or perhaps you travel
  777.     often for business or pleasure and would like to keep track of the best
  778.     places to eat in various cities. A database would allow you to keep
  779.     track of the information and would let you search through it in an easy
  780.     manner. You may want to send different holiday cards to your friends
  781.     than to your associates, or you may wish to look up restaurants by city
  782.     or by cuisine. Any of these can be a Smart Document.
  783.  
  784.          Eventually, you may find that you have created a number of smart
  785.     documents that each do a specific task. With Surefire, you can create a
  786.     smart document that is a menu linking all of these other documents into
  787.     one personalized application. The uses of Surefire's Smart Documents are
  788.     almost limitless. As you will see, a smart document can become
  789.     increasingly more intelligent by incorporating features one at a time to
  790.     solve the task at hand. This manual will show you how to create useful
  791.     Surefire documents and gradually add more and more intelligence to them.
  792.  
  793.     Chapter Preview
  794.  
  795.          Chapter 2 guides you through the steps to install and run Surefire.
  796.  
  797.          Chapters 3 through 9, show you how to get around in Surefire and
  798.     how to use the word processing features. These features range from
  799.     creating simple letters to manipulating more complicated documents.
  800.  
  801.          Chapter 10 shows you how to use Surefire's handy calculator.
  802.  
  803.          Chapters 11 through 15 show how to create Smart Documents that
  804.     directly calculate information. Chapter 16 shows specifically how this
  805.     applies to spreadsheets.
  806.  
  807.          Chapters 17 through 21 describe Surefire databases. You will see
  808.     how Smart documents can store and retrieve many records of similar
  809.     information. Chapter 19 tells you how you can access a database in many
  810.     ways while Chapter 20 specifically shows you how to make forms and form
  811.     letters.  In Chapter 22 you will learn how to generate reports from a
  812.     Surefire database, right in your document.
  813.  
  814.          Chapters 23 and 24 include more detail on using printers and
  815.     managing Surefire documents. In addition, you will see how to import and
  816.     export data between Surefire and other programs.
  817.  
  818.          Chapter 25 gives you more information about the Surefire system.
  819.     This includes a discussion of backing up your files.
  820.          Appendix A describes all of the functions that are available in
  821.     Surefire to manipulate Surefire data.
  822.  
  823.  
  824.  
  825.  
  826.                           Copyright (c) 1993 Piaf, Inc.
  827.  
  828.     Surefire S2.0 User's Guide                                       Page 15
  829.  
  830.     Chapter 2      -    GETTING STARTED
  831.  
  832.          Before you install Surefire, you should be somewhat familiar with
  833.     the DOS operating system and your particular hardware. You should know
  834.     about the DOS directory structure, the type of disks drive(s) you have
  835.     and the identifiers of these drives (i.e. A:, B:, C:, etc).  Consult
  836.     your DOS reference manual for complete information.
  837.  
  838.          After downloading surefire.zip onto your hard drive, and unpacking
  839.     the Surefire files from it, be sure to run the Surefire demo.  See the
  840.     section "The Surefire Demo/Tutorial" at the end of this chapter for more
  841.     information.
  842.  
  843.     You will see these files:
  844.  
  845.          The Surefire program (surefire.exe), the Surefire system help file,
  846.          printer drivers and other miscellaneous files associated with the
  847.          Surefire system. You will also have the files needed to run the
  848.          Surefire Demo/Tutorial.
  849.  
  850.          You may put the Surefire directory in your path by updating your
  851.     AUTOEXEC.BAT file so that the directory is in your PATH command. Read
  852.     your DOS manual for directions on doing this. This will allow you to run
  853.     Surefire from any directory.
  854.  
  855.     Running Surefire
  856.  
  857.          1.  Type SUREFIRE at the DOS prompt.
  858.          If you have added the Surefire directory to your DOS path (in
  859.          your autoexec.bat file) you will be able to run Surefire from
  860.          any directory on your system. If you have not, you must change
  861.          directory to the Surefire directory before running Surefire.
  862.  
  863.          Surefire will look in your default drive and directory for files
  864.          and documents that you access. If you type the command:
  865.          "SUREFIRE .", at the DOS prompt, Surefire will look in your current
  866.          drive and directory for any files and ignore the defaults saved in
  867.          the configuration file. See the discussion of current drive and
  868.          directory under System Setup later in this chapter.
  869.  
  870.          2.  Press (Enter)
  871.          This will run Surefire. You will see a copyright notice and then
  872.          the initial Surefire screen.
  873.  
  874.          The screen appears with the Menu Bar/Status line at the top. Just
  875.     below this line is the top portion of an empty standard 8 1/2 by 11
  876.     sheet of paper. This is a new document. You may move about anywhere in
  877.     this document and immediately type in information. The document may then
  878.     be printed or saved for later use.
  879.  
  880.  
  881.  
  882.  
  883.  
  884.  
  885.                           Copyright (c) 1993 Piaf, Inc.
  886.  
  887.     Surefire S2.0 User's Guide                                       Page 16
  888.  
  889.     Running Surefire with a Document
  890.  
  891.          You may specify the name of a Surefire document that you want to be
  892.     displayed immediately upon running Surefire. To do this, type SUREFIRE
  893.     and a document name at the DOS prompt. Surefire will look for this
  894.     document in your current DOS directory. Press (Enter). This will run
  895.     Surefire. You will see a copyright notice and then the screen will
  896.     appear with the first page of the previously saved document.
  897.  
  898.     Leaving Surefire
  899.  
  900.          You can leave or exit from Surefire by choosing "Exit" from the
  901.     File menu or by pressing (ALT + X). You may not exit from Surefire if
  902.     there are any windows or menus currently displayed. Surefire will
  903.     display a message window to warn you if there is the possibility of
  904.     data loss due to not saving your document changes.
  905.  
  906.     System Information
  907.  
  908.          System information is always available by choosing the option
  909.     "Info..." from the File menu. The Info window shows the current version
  910.     number of the system with a copyright notice. You will also see the
  911.     current date and time (provided you have set the DOS system clock) and
  912.     the amount of memory available for the document.
  913.  
  914.     System Setup
  915.  
  916.          You may define and modify general system parameters and hardware
  917.     configuration information in the Setup window. This window is accessed
  918.     by choosing the option " Setup..." from the File menu. It displays the
  919.     current disk drive, the current working directory, the current printer
  920.     and the current printer port. In addition, it lets Surefire know how to
  921.     display information on your video device as well as the current settings
  922.     of other document related parameters.
  923.  
  924.          After making the modifications desired, you can choose OK to have
  925.     the settings be used for the current session only.  If SAVE is chosen,
  926.     the settings are used for the current session and subsequent sessions.
  927.  
  928.        Current Drive and Directory
  929.  
  930.          Any files you read or save will be put in the directory where
  931.     Surefire was installed.  You can change to another directory by changing
  932.     the values for the current drive and directory in the Setup window.
  933.  
  934.          Specifying the drive and directory tells Surefire where to look for
  935.     documents, text and data files when you do a Get, and where to put
  936.     documents and files when you do a Save. To specify a drive, type in a
  937.     letter (usually A,B,C,D or E) in the field to the right of the label
  938.     "Drive:". You need not type in the colon ':' or slash '\'.  To change
  939.     the current directory, enter the full path of the desired directory in
  940.     the field to the right of the label "Directory:".  While a complete
  941.     description of drives and directories is not necessary to use Surefire,
  942.     you may wish to refer to your DOS reference manual for more information.
  943.  
  944.                           Copyright (c) 1993 Piaf, Inc.
  945.  
  946.     Surefire S2.0 User's Guide                                       Page 17
  947.  
  948.        Current Printer and Printer Port
  949.  
  950.          Specifying the printer type is done with the multiple choice button
  951.     to the right of the text "Printer is". If you press the Zoom key (ALT+Z)
  952.     when the cursor is on this button, Surefire will display the names of
  953.     all available printer definitions. Specifying a printer here indicates
  954.     to Surefire how to send information to the printer when you choose PRINT
  955.     or SEARCH & PRINT in the Print window.
  956.  
  957.          The printer port refers to how and where your printer is physically
  958.     connected to your computer. You will find a multiple choice button to
  959.     the right of the text "on Port" that is used to indicate the printer
  960.     port to Surefire. If you press the Zoom key (ALT+Z) when the cursor is
  961.     on this button, Surefire will display the names of available ports.
  962.  
  963.          Please read "Chapter 23: More About Printing" in this manual, for
  964.     a discussion about setting up printers.
  965.  
  966.        Using Your Display
  967.  
  968.          Depending on whether you have a monochrome or color monitor or the
  969.     type of grey scale supported by your laptop or display monitor, you may
  970.     choose the representation for how Surefire will appear on your display
  971.     device. The possible display types are described as follows:
  972.  
  973.          Display Types       Indication
  974.  
  975.          Default             Automatically set for monochrome or color
  976.                              depending on your equipment.
  977.          Color               Indicates that the monitor is color.
  978.          Grey                Use for grey scale or color emulation.
  979.          Inv Grey            Similar to Grey but reversed for LCD
  980.                              displays.
  981.          B & W               Forces monochrome attributes on
  982.                              non-monochrome monitor.
  983.  
  984.     Note:   If an incorrect display type is shown or you wish to change your
  985.     display type, you must save the change, exit from Surefire and run
  986.     Surefire again from the DOS prompt.
  987.  
  988.          If you have a computer that does color emulation on black and white
  989.     monitors, you may want to try a few options to see what is most
  990.     pleasing. This may be of particular interest if you are using a laptop
  991.     or portable computer. If you have an LCD display, and the default
  992.     display setting doesn't produce enough contrast, you should try the "Inv
  993.     Grey" setting.
  994.  
  995.          Another option is to set your computer to emulate a monochrome
  996.     monitor instead of color. Sometimes this can be done by using the "B &
  997.     W" display option. Try it. If underlines are not displayed, you may need
  998.     to set your computer hardware to monochrome emulation mode. This may not
  999.     be available on some computers. Consult your computer manual for how to
  1000.     change its display modes.
  1001.  
  1002.  
  1003.                           Copyright (c) 1993 Piaf, Inc.
  1004.  
  1005.     Surefire S2.0 User's Guide                                       Page 18
  1006.  
  1007.     Document Related Parameters
  1008.  
  1009.          Any of the document related parameters shown in the table below can
  1010.     be changed for the current Surefire session or set for all subsequent
  1011.     sessions. To change any parameter but Tab Size, position the cursor over
  1012.     the appropriate Yes or No and press (Spacebar).
  1013.  
  1014.     Tab Size
  1015.  
  1016.          The Tab Size indicates where to put equally spaced tab stops. When
  1017.     you are editing a document and you press the (Tab) key, blank characters
  1018.     are inserted on the page from the current cursor position up to the next
  1019.     tab stop. You enter the number of characters to be between tab stops in
  1020.     the field to the right of the label "Tab Size:".
  1021.  
  1022.     Word Wrap
  1023.  
  1024.          Word Wrap is a mode that can be either on or off. When on, words
  1025.     that you type on a page of your document are automatically moved to the
  1026.     next line if there is not enough room on the current line. The value
  1027.     that you set here will be reflected in the Word Wrap menu item on the
  1028.     Page menu. Read "Chapter 4: Typing Text" for a complete discussion of
  1029.     Word Wrap.
  1030.  
  1031.     Auto Calc
  1032.  
  1033.          Auto Calc is a mode that can be either on or off. When on, Surefire
  1034.     will always calculate new field values whenever any field value changes.
  1035.     The value you set here will be reflected in the Auto Calc menu item on
  1036.     the Field menu.  Read "Chapter 15: Using Field Commands" for a complete
  1037.     discussion of Auto Calc.
  1038.  
  1039.     Hints
  1040.  
  1041.          The response that you enter, in the field to the right of the label
  1042.     "Hints:" tells Surefire whether you want the Hint Line at the bottom of
  1043.     your screen to be displayed or not. The Hint Line shows the more
  1044.     important keystrokes that are available at any time during your Surefire
  1045.     session. This information changes depending upon whether there is an
  1046.     open Surefire window or menu. You may also decide to display or
  1047.     undisplay the Hint Line by pressing (Shift+F10). Below is an example of
  1048.     the hint line displayed when there are no open Surefire windows or
  1049.     menus.
  1050.  
  1051.     Auto Backup
  1052.  
  1053.          Auto Backup may be on or off. If on, Surefire will save a copy of
  1054.     your document before you save any changes. You may restore the previous
  1055.     version of your document from the copy if you wish. See "Chapter 25:
  1056.     Surefire System Topics" for a complete discussion of Backup and Recovery
  1057.     procedures.
  1058.  
  1059.  
  1060.  
  1061.  
  1062.                           Copyright (c) 1993 Piaf, Inc.
  1063.  
  1064.     Surefire S2.0 User's Guide                                       Page 19
  1065.  
  1066.     The Surefire Demo/Tutorial
  1067.  
  1068.          The quickest way to become familiar with Surefire is to see it and
  1069.     feel it. You can do this with minimal effort by running the Surefire
  1070.     demo/tutorial. You can view the demo/tutorial completely by just using
  1071.     the (Spacebar) key. In some places, you can use the same keys as in
  1072.     Surefire itself. The demo/tutorial will really get you excited about
  1073.     what you can do. You run the demo/tutorial by typing SFDEMO at the DOS
  1074.     prompt.
  1075.  
  1076.          The example documents described in the demo are available with the
  1077.     registered version of Surefire. These documents will help you build your
  1078.     own Smart Document applications. They include a basic lease manager, a
  1079.     contact manager and a company organization system. The on-line help
  1080.     specific to these example applications will provide a template for
  1081.     developing your own application help.
  1082.  
  1083.  
  1084.  
  1085.  
  1086.  
  1087.  
  1088.  
  1089.  
  1090.  
  1091.  
  1092.  
  1093.  
  1094.  
  1095.  
  1096.  
  1097.  
  1098.  
  1099.  
  1100.  
  1101.  
  1102.  
  1103.  
  1104.  
  1105.  
  1106.  
  1107.  
  1108.  
  1109.  
  1110.  
  1111.  
  1112.  
  1113.  
  1114.  
  1115.  
  1116.  
  1117.  
  1118.  
  1119.  
  1120.  
  1121.                           Copyright (c) 1993 Piaf, Inc.
  1122.  
  1123.     Surefire S2.0 User's Guide                                       Page 20
  1124.  
  1125.     Chapter 3      -    GETTING AROUND
  1126.  
  1127.          In the spirit of making an easy-to-use program, we created Surefire
  1128.     with a custom window interface.  Since Surefire doesn't require the
  1129.     memorization of hundreds of cryptic commands or overload you with too
  1130.     much information at once, you'll soon discover that Surefire's window
  1131.     system is a refreshing departure from other DOS applications. Surefire
  1132.     groups all of the same types of functions together in specialized
  1133.     windows.
  1134.  
  1135.          If you have seen other window systems before such as the Apple
  1136.     Macintosh or Microsoft Windows for the IBM PC, then you are already
  1137.     familiar with the basic concepts behind a window system.  However,
  1138.     because Piaf designed a custom interface for Surefire, the interface has
  1139.     some unique features not seen anywhere else.  Therefore, whether or not
  1140.     you've used window-based programs before, we recommend that you look
  1141.     over this chapter to familiarize yourself with Surefire's approach.
  1142.  
  1143.     The Document
  1144.  
  1145.          The document is carefully designed to provide you with a flexible
  1146.     environment perfectly suited for handling every aspect of document
  1147.     generation.  For example, the word processing features found in the
  1148.     document are best used for manipulating text and dealing with formatting
  1149.     concerns, while the data management features give you complete control
  1150.     of how you want your data presented.
  1151.  
  1152.     The Page Display
  1153.  
  1154.          If you choose to start a new document, the screen shows you a
  1155.     representation of a standard 8 1/2 by 11 blank sheet of paper.  This is
  1156.     the first page.  The grey area represents the margin, and the blank
  1157.     space represents the writing area.  Text is added to the page by typing,
  1158.     and it appears to the left of the cursor.  If you make a mistake, using
  1159.     the backspace key will erase characters to the left of the cursor.  To
  1160.     change the position of the cursor on the page, you use the arrow keys on
  1161.     your keyboard.  On some PC, AT and XT keyboards you'll see separate
  1162.     arrow keys, while on others, you'll find them on the numerical keypad.
  1163.  
  1164.     Menus
  1165.  
  1166.          While a screen looks like a complete display, a menu or window
  1167.     looks like an independent display-within-a-display.  Whenever you choose
  1168.     a command in a menu or window, you are telling Surefire exactly what you
  1169.     want it to do for you at the time.  Menus give you a list of choices
  1170.     called menu items.
  1171.  
  1172.        The Menu Bar
  1173.  
  1174.          Menus are accessed from the menu bar.  Because it is always
  1175.     visible, the menu bar provides you access to all menus at all times.
  1176.     This line also provides you with essential status information about what
  1177.     you are currently doing in Surefire.
  1178.  
  1179.  
  1180.                           Copyright (c) 1993 Piaf, Inc.
  1181.  
  1182.     Surefire S2.0 User's Guide                                       Page 21
  1183.  
  1184.          The Menu bar consists of seven menus (or pull-down windows):  File,
  1185.     Page, Operate, Edit, Field, Data and Graphic.  In this chapter, we will
  1186.     be using the File and Page menus in our examples.  These and the other
  1187.     menus will be detailed fully in subsequent chapters.
  1188.  
  1189.        Choosing a Menu Item
  1190.  
  1191.          Follow these steps to choose a menu item:
  1192.  
  1193.          1.  Press (F10).
  1194.          The Menu bar is accessed by pressing function key (F10). This
  1195.          places the cursor on the word File.
  1196.  
  1197.          2.  Move the Cursor.
  1198.          Pressing the (right arrow) key will place the cursor at Page, and
  1199.          a (left arrow) from Page will return the cursor to File.
  1200.  
  1201.          3.  Open the File menu.
  1202.          Pressing the (down arrow) key at File will display the File menu.
  1203.  
  1204.          4.  Open the other menus.
  1205.          Use the (left or right arrow) keys to cycle through all 7 menus.
  1206.  
  1207.          5.  Cycle through the menu items.
  1208.          The (down arrow) will cycle through available choices and the (up
  1209.          arrow) will cycle in the reverse direction.
  1210.  
  1211.          6.  Select one of the menu items.
  1212.          When the cursor is over the desired choice, press (Enter) and some
  1213.          kind of action will be performed.  For example, choose Get... in
  1214.          the File menu.
  1215.  
  1216.          7.  Close the window.
  1217.          When you choose Get..., a window appears asking for the name of the
  1218.          file that you want Surefire to load.  Close the window by typing
  1219.          (Esc) for now.  This will return the cursor to the document.
  1220.  
  1221.          If you chose "Get..." in the File menu, you were presented with a
  1222.     window that requested more information.  For "Get..." and several other
  1223.     menu items, a window will appear when the choice is selected.  However,
  1224.     in most instances, Surefire will simply perform an action in response to
  1225.     a menu item selection.  For example, the choice "Add Page" on the Page
  1226.     menu appends a page to the current page of the document without bringing
  1227.     up a window.  You can tell the difference between the two kinds of items
  1228.     if you see three dots "..." following the item.  The dots indicate that
  1229.     choosing an item will open a window.
  1230.  
  1231.  
  1232.        Accelerated Menu Selection
  1233.  
  1234.          In addition to choosing menus from the Menu Bar, you can choose
  1235.     menus directly from the keyboard by pressing the (ALT) key with the
  1236.     appropriate highlighted or red-colored letter of the menu.  For example,
  1237.     to quickly bring up the File menu, you type (ALT + F).
  1238.  
  1239.                           Copyright (c) 1993 Piaf, Inc.
  1240.  
  1241.     Surefire S2.0 User's Guide                                       Page 22
  1242.  
  1243.          Once you've opened a menu, you can also quickly choose an item.  In
  1244.     our File menu example, you have two options for choosing the menu item
  1245.     'New'; you could either move the cursor to the item and hit (Enter), or
  1246.     you could type the item's highlighted letter (N).
  1247.  
  1248.        Inactive Menu Items
  1249.  
  1250.          When a menu item is unavailable because it is inappropriate to the
  1251.     type of work you are doing at the time, it will not have a highlighted
  1252.     or red-colored letter, and cannot be selected.
  1253.  
  1254.     Shortcuts
  1255.  
  1256.          For the menu items which are frequently used, it may be bothersome
  1257.     to bring up a menu each time you want to access the choice.  Therefore,
  1258.     shortcut keybindings are available for the commonly-used menu items.
  1259.     Shortcuts are special keystrokes which give you direct access to the
  1260.     desired menu item. If a menu item has a shortcut, the keystroke will be
  1261.     indicated on the menu to the right of the menu item.
  1262.  
  1263.     Windows
  1264.  
  1265.          As you saw in the Setup window in the previous chapter, some
  1266.     windows ask you to supply additional information.  Other kinds of
  1267.     Surefire windows provide you with information or alert you to a possible
  1268.     problem.  These are called message windows.  Whenever a message window
  1269.     appears, its function is to request some kind of input that Surefire
  1270.     needs before proceeding, and thus, you must respond to it before you can
  1271.     do anything else in the program.
  1272.  
  1273.          When you look at a window, you will notice three kinds of items:
  1274.     informative text, areas for typing, and buttons.  The typing area is
  1275.     called a data entry field.  The words not associated with a data entry
  1276.     field are usually buttons and they come in two varieties: "action" and
  1277.     "multiple choice".
  1278.  
  1279.     Window Fields
  1280.  
  1281.          In Surefire, fields are areas found in windows and documents with
  1282.     some sort of assigned function.  On color monitors, window fields are
  1283.     blue and document fields are green.  On a monochrome monitor, all fields
  1284.     are underlined. When you move the cursor into a field, the area changes
  1285.     to a black background with white letters.  Windows have four varieties
  1286.     of fields:  data entry, action button, multiple choice button and
  1287.     logical choice button. You can easily determine which kind of window
  1288.     item you are looking at by using the following guidelines:
  1289.  
  1290.        Data Entry Fields:  In windows, you type in data entry fields.  You
  1291.               can easily identify them because they always follow
  1292.               informative text, and usually a colon.
  1293.  
  1294.  
  1295.  
  1296.  
  1297.  
  1298.                           Copyright (c) 1993 Piaf, Inc.
  1299.  
  1300.     Surefire S2.0 User's Guide                                       Page 23
  1301.  
  1302.        Action Buttons:  Action buttons always preform an operation when
  1303.               you "press" them.  They are displayed as uppercase words and,
  1304.               like all other window fields are blue or underlined.  You
  1305.               always use these buttons when closing a window.
  1306.  
  1307.        Multiple Choice Buttons:  All multiple choice buttons are
  1308.               capitalized lowercase words.  They are used for setting
  1309.               options.  All multiple choice buttons can be zoomed.  Whenever
  1310.               you zoom a multiple choice button, you are presented with a
  1311.               list of choices for that button.  Press (ALT+Z) to "zoom" a
  1312.               multiple choice button or (Spacebar) to cycle through values.
  1313.  
  1314.        Logical Choice Buttons:  Logical choice buttons look like multiple
  1315.               choice buttons as they are also capitalized lowercase words.
  1316.               Unlike multiple choice buttons, logical choice buttons answer
  1317.               a Yes/No question, and are easily identified by the question
  1318.               mark in the informative text preceding them. Press (Spacebar)
  1319.               to change the value of a logical choice button.
  1320.  
  1321.        Moving Between Fields
  1322.  
  1323.          The simplest way to change the position of the cursor inside a
  1324.     window is to use the (Home) and (End) keys.  (End) will move the cursor
  1325.     to the next item of interest in the same way your eye moves across the
  1326.     page when you are reading. That is from left-to-right and top-to-bottom.
  1327.     In contrast, the (Home) key moves in the opposite direction.
  1328.  
  1329.        Changing Logical and Multiple Choice Buttons
  1330.  
  1331.          To change a logical choice button from Yes to No or from No to Yes,
  1332.     you use the (Spacebar).  Multiple choice buttons let you choose from a
  1333.     list of items.  To operate a multiple choice button, you can either use
  1334.     (Spacebar) to scroll through all of the choices (as you did with the
  1335.     logical choice button); or you can "zoom" the button by pressing
  1336.     (ALT+Z).  Whenever you use the zoom option, Surefire will display all of
  1337.     your choices for the button in a "pop-list".
  1338.  
  1339.        Choosing Action Buttons
  1340.  
  1341.          In contrast to the multiple choice buttons which are always
  1342.     displayed as lowercase words, all action buttons are uppercase and are
  1343.     used to perform an action when you "press" them.
  1344.  
  1345.          Action buttons are always used whenever you close a window.  Most
  1346.     of the Surefire windows have an action button labeled OK and a button
  1347.     labeled CANCEL. The OK button is used to tell Surefire that you either
  1348.     want to go ahead with an operation or that the new settings shown in the
  1349.     window are correct. The CANCEL button tells Surefire to ignore all of
  1350.     the changes you've made in the window.  For example, in the Get File
  1351.     window, OK tells Surefire to read the file whose name is given in the
  1352.     window, and CANCEL tells Surefire to forget about reading a file.  To
  1353.     access these buttons you use the (Home) an (End) keys.  You can use
  1354.     the shortcuts: (Ctrl + Enter) for OK and (Esc) for CANCEL to bypass
  1355.     having to use the corresponding action buttons.
  1356.  
  1357.                           Copyright (c) 1993 Piaf, Inc.
  1358.  
  1359.     Surefire S2.0 User's Guide                                       Page 24
  1360.  
  1361.     Getting Help
  1362.  
  1363.          Surefire has several forms of help. Help displays descriptions of
  1364.     procedures and commands so that you can complete your tasks without
  1365.     having to turn away from the screen.  Some help information is always
  1366.     visible such as the information in the Status Line. If desired, you can
  1367.     display Hints (see below) for suggestions on which keys to press, and
  1368.     Context Help for more information on common commands and procedures.
  1369.  
  1370.        The Status Line
  1371.  
  1372.          The Status line is placed to the right of the Menu Bar on the top
  1373.     line of the screen. The Status line provides you with word processing
  1374.     and database information; the current document name; the current page,
  1375.     line; and column.  It also lets you know what Surefire is doing from
  1376.     time to time with an operation indicator.
  1377.  
  1378.          The operation indicator is found on the right side of the status
  1379.     line and appears highlighted.  It notifies you that an operation is
  1380.     taking a long time and tells you when it is finished.  The meanings of
  1381.     some indicators are shown below:
  1382.  
  1383.          Indicator      Meaning
  1384.  
  1385.          GETTING        A document file is being loaded into Surefire.
  1386.          SAVING         The changes in a document file are being saved.
  1387.          LOOKING        A word is being looked for in the document.
  1388.          REPLACING      A substitution of occurrences of a word by another
  1389.                         word in the document is being processed.
  1390.  
  1391.        Hints
  1392.  
  1393.          Surefire uses Keybindings to help you perform operations and make
  1394.     choices easily and efficiently.  Recall that when you wanted to use a
  1395.     menu, you typed (F10) to access the Menu Bar.  Likewise, when you wanted
  1396.     to close a window, you typed (Esc) to return the cursor to the document
  1397.     page.
  1398.  
  1399.          So that you don't have to keep a mental record of all of the
  1400.     keybindings used in Surefire, we offer a help line at the bottom of the
  1401.     screen to show you a context-specific display of keybindings.  Only the
  1402.     most common keybindings that are relevant for the current task are
  1403.     displayed.  For example, the hint line for a window shows you that the
  1404.     (Home) and (End) keys are used to move around; the (Esc) key will cancel
  1405.     the window; and the keys: (Ctrl + Enter) will verify the window
  1406.     information.  If you were to type (Esc) and return to the document, you
  1407.     would see only the keybindings and their contextual meaning appropriate
  1408.     to Surefire's word processing and data management features.
  1409.  
  1410.          After some experience with using Surefire, you may not need to see
  1411.     the keybindings all the time.  The line showing the keybindings can be
  1412.     hidden by typing (Shift+F10).  You can redisplay the line by typing
  1413.     (Shift+F10) again.
  1414.  
  1415.  
  1416.                           Copyright (c) 1993 Piaf, Inc.
  1417.  
  1418.     Surefire S2.0 User's Guide                                       Page 25
  1419.  
  1420.        Context Help
  1421.  
  1422.          When you need help with using a menu or window, you can receive it
  1423.     by displaying the menu or window and then pressing function key (F1).
  1424.     The (F1) key displays a Help window that briefly explains what can be
  1425.     done in that menu or window.  Often, there is more help information than
  1426.     can be displayed in one screen.  To show another help screen, use the
  1427.     arrow keys or the (Page Up) and (Page Down) keys.  When you are
  1428.     finished, press (Esc) to close the Help window.
  1429.  
  1430.          When there are no open menus or windows, pressing (F1) provides you
  1431.     with the most general information about Surefire.
  1432.  
  1433.        Document Help
  1434.  
  1435.          Document help may be provided for specific Surefire documents.
  1436.     After you have created a document using Surefire, you may want to use
  1437.     the document as a complete application in itself and will want others in
  1438.     your business to use it.  To provide your associates with help specific
  1439.     to your document, you can create your own help information.  This help
  1440.     information, if provided, is obtained by pressing function key (F2).
  1441.     See the section "Specifying Document Help" in "Chapter 24: More About
  1442.     Surefire Documents", for information on providing document help for your
  1443.     documents.
  1444.  
  1445.     Using a Mouse
  1446.  
  1447.          While you may navigate Surefire quite well with your keyboard,
  1448.     your mouse will make using Surefire even easier and more fun. Surefire
  1449.     supports any mouse that is Microsoft compatible. Make sure that your
  1450.     mouse is connected to the correct port and your mouse driver is loaded
  1451.     before running Surefire. For instructions on doing this, refer to the
  1452.     manual that came with your mouse.
  1453.  
  1454.        General Terms
  1455.  
  1456.          Before you learn how to use the mouse in Surefire, we will define
  1457.     some terms that you will see used throughout this section of the manual:
  1458.  
  1459.          Click - Press and release the left mouse button
  1460.          Hold - Press and hold down the left mouse button
  1461.          Drag - Hold the left mouse button and move the mouse at the
  1462.               same time
  1463.          Release - Release the left mouse button after Hold or Drag
  1464.          Move - Move the mouse with no buttons pressed
  1465.  
  1466.        The Mouse Buttons
  1467.  
  1468.          For the above operations you will use the left mouse button. This
  1469.     is whether you have a 2 or a 3 button mouse.  Use the right mouse button
  1470.     as the Escape key or Cancel operation. If your mouse is connected
  1471.     properly and your mouse driver is initialized, when you run Surefire you
  1472.     will see a mouse cursor initially appearing as a diamond in a box. This
  1473.     mouse cursor follows the movements of the mouse.
  1474.  
  1475.                           Copyright (c) 1993 Piaf, Inc.
  1476.  
  1477.     Surefire S2.0 User's Guide                                       Page 26
  1478.  
  1479.        Mouse Cursor vs Page Cursor
  1480.  
  1481.          When you're using the mouse in Surefire, you will see both the
  1482.     mouse cursor and the normal page cursor (usually a blinking underscore
  1483.     character). The mouse cursor tracks the movements of your mouse as you
  1484.     move it about on your desk. The page cursor shows the next position in
  1485.     the document for typing text or starting a selection. When you Click or
  1486.     Drag the mouse in your document, the page cursor will follow the mouse
  1487.     cursor. This lets you position the page cursor with the mouse thereby
  1488.     allowing you to enter text at a new spot.
  1489.  
  1490.          To move the cursor anywhere in the document, make sure the cursor
  1491.     is free (press (F3) until an 'F' appears in the status line), move the
  1492.     mouse cursor to where you want the page cursor to be and Click.  If you
  1493.     Click on a field, that field will become the current field. The current
  1494.     field will then be highlighted. If the cursor is not free, you will only
  1495.     be able to Click on a field. Using the mouse with fields is discussed
  1496.     later in this section.
  1497.  
  1498.          When there are no fields in the document, the cursor is always free
  1499.     and there is no 'F' in the status line.
  1500.  
  1501.        Menu Selection
  1502.  
  1503.          There are two ways to do a menu selection with the mouse. When the
  1504.     mouse cursor is on a menu name you may either Click or Hold the mouse
  1505.     button. These two methods are discussed below.
  1506.  
  1507.        Clicking on the Menu
  1508.  
  1509.          To select from a menu by clicking on the menu name, move the mouse
  1510.     cursor to the Menu Bar and Click on the desired menu name. This will
  1511.     cause the desired menu to be displayed. Now click the mouse on the menu
  1512.     item that you want to choose. Click off the menu to close the menu
  1513.     without making a selection.
  1514.  
  1515.        Dragging on the Menu
  1516.  
  1517.          You may select from a menu by Holding down the mouse button. Move
  1518.     the mouse to the desired menu name on the Menu Bar and Press. You may
  1519.     drag the mouse cursor from side to side along the Menu Bar while you
  1520.     keep the button pressed until the menu you want is displayed. Now Drag
  1521.     the mouse down the menu, without releasing the mouse button, until the
  1522.     menu item you want is highlighted. Finally, Release the mouse button to
  1523.     choose that item. Releasing the mouse anywhere off the menu will close
  1524.     that menu without making a selection.
  1525.  
  1526.  
  1527.  
  1528.  
  1529.  
  1530.  
  1531.  
  1532.  
  1533.  
  1534.                           Copyright (c) 1993 Piaf, Inc.
  1535.  
  1536.     Surefire S2.0 User's Guide                                       Page 27
  1537.  
  1538.        Using the Mouse in System Windows
  1539.  
  1540.          You use a mouse in system windows very directly as shown below.
  1541.  
  1542.        Choosing a Button
  1543.  
  1544.          To Choose an action button such as OK or CANCEL, click on that
  1545.     button. The corresponding action is preformed immediately.
  1546.  
  1547.        Changing Values of Multiple Choice Buttons
  1548.  
  1549.          To change the value of a multiple choice button, first Move the
  1550.     mouse to the button. Now Press and Hold the left mouse button. This will
  1551.     zoom the multiple choice list similar to pressing (ALT+Z). An example of
  1552.     a multiple choice button is the Page Size button in the Setup window.
  1553.     As you hold down the left mouse button on this field, you can Drag the
  1554.     mouse over the choices that appear.
  1555.  
  1556.          Additional choices may scroll if you Hold the mouse over the bottom
  1557.     list border. Holding the mouse on the top list border will scroll the
  1558.     items in reverse. Arrows at the top right and bottom right borders of the
  1559.     pop-list will be displayed if there are more choices in that direction.
  1560.     To choose an item, Release the mouse over the desired item. If you decide
  1561.     not to select an item, Move the mouse off of the pop-list. Press the
  1562.     right mouse button to cancel.
  1563.  
  1564.        Toggling Logical Fields
  1565.  
  1566.          To change the value of a logical field, Click on that field. This
  1567.     will change 'Yes' to 'No' or 'True' to 'False', etc.
  1568.  
  1569.        Selecting a Field
  1570.  
  1571.          To select a Text, Numeric or Date field, Click on that field. To
  1572.     select a cell of a multiple choice numeric field, Click on the cell.
  1573.     That field or cell becomes the current field or cell. To position the
  1574.     page cursor within a field, move the mouse again and Click elsewhere in
  1575.     the field. The page cursor indicates where text will be entered when you
  1576.     type.
  1577.  
  1578.        Choosing Files from the Directory List
  1579.  
  1580.          You may zoom a file list in the Get, Save, Delete and Rename system
  1581.     windows. This directory list works like the pop-list described for
  1582.     multiple choice buttons above.  First Click on the file name entry field
  1583.     and then Hold the mouse. Drag the mouse over the choices that appear.
  1584.  
  1585.          Additional choices may scroll if you Hold the mouse over the bottom
  1586.     list border. Holding the mouse over the top list border will scroll the
  1587.     list in the reverse direction. Arrows at the top right and bottom right
  1588.     borders indicate whether there are additional files in that direction. To
  1589.     choose a file, Release the mouse over the desired file name. If you decide
  1590.     not to select a file, move the mouse off of the list and press the right
  1591.     mouse button.
  1592.  
  1593.                           Copyright (c) 1993 Piaf, Inc.
  1594.  
  1595.     Surefire S2.0 User's Guide                                       Page 28
  1596.  
  1597.        Using Wildcards with the Directory Listing
  1598.  
  1599.          Generally Surefire will display all files of the current type (e.g.
  1600.     Document or Text) in the current directory. You may use the asterisk '*'
  1601.     character for part of the file name to denote a wild card. For example, if
  1602.     you are Getting a Document and the current directory is C:\STATES, a file
  1603.     name of  AL* may show information for the documents ALASKA and ALABAMA.
  1604.     Likewise, if you enter a full or part path name such as C:\MYDIR\Q*, you
  1605.     will see all files of the current file type beginning with 'Q' in that
  1606.     directory.
  1607.  
  1608.        Closing a System Window without Action
  1609.  
  1610.          Click on CANCEL or press the right mouse button to close a system
  1611.     window and cancel any operation.
  1612.  
  1613.        Using the Hint Line
  1614.  
  1615.          Most operations in Surefire are available as menu selections but
  1616.     some common operations such as (F1) for Surefire Help, are available only
  1617.     as keystrokes. By clicking on the Surefire Hint Line, you may perform
  1618.     these operations with your mouse.
  1619.  
  1620.          When the Hint Line is displayed, it appears at the bottom of your
  1621.     screen. Press (Shift+F10) to display the Hint Line if you don't see it.
  1622.     The Hint Line shows the most useful keystrokes available during the
  1623.     current operation or with the currently displayed System Window. You will
  1624.     notice that key names are highlighted. Click on or to the right of the
  1625.     highlighted key name on the Hint Line to perform the associated action.
  1626.  
  1627.        Scrolling your Document
  1628.  
  1629.          To scroll your document, hold the left mouse button down at the edges
  1630.     of the document. To scroll a document upward press and hold the left mouse
  1631.     button while the mouse cursor is on the line just under the Menu bar. If
  1632.     the Command window or Query window is displayed, place the mouse cursor
  1633.     just under the window.
  1634.  
  1635.          To scroll downward, hold the mouse at the bottom of the screen, or
  1636.     just over the Hint Line if the Hint Line is displayed. If the document is
  1637.     too wide for the screen, you may scroll to the right or left. Hold the
  1638.     mouse at the right edge of the document to scroll to the right or the
  1639.     left edge of the document to scroll to the left.
  1640.  
  1641.        Scrolling a Pop-list
  1642.  
  1643.          Surefire uses pop-lists to display many types of items from which
  1644.     you may choose. The Directory listing and values of multiple choice
  1645.     buttons in System Windows are shown in pop-lists. Pop-lists are also
  1646.     used to show possible values for a document text field. If the number of
  1647.     values cannot be displayed at one time, you may scroll the pop-list. Hold
  1648.     the left mouse button while the mouse cursor is positioned on the up arrow
  1649.     seen on the top border or the down arrow seen on the bottom border of the
  1650.     pop-list. No arrows are displayed if all of the items are visible.
  1651.  
  1652.                           Copyright (c) 1993 Piaf, Inc.
  1653.  
  1654.     Surefire S2.0 User's Guide                                       Page 29
  1655.  
  1656.     Chapter 4      -    Typing Text
  1657.  
  1658.          This chapter will guide you through the first steps of word
  1659.     processing - getting your words on the screen and saving them in a file.
  1660.  
  1661.          Those of you who have used other word processors before and are
  1662.     acquainted with common word processing features such as word wrap,
  1663.     typeover and insert modes, this chapter can be used as an overview.
  1664.     Just browse through the step-by-steps to see how Surefire's approach
  1665.     compares with what you've used in the past.  Once you've become familiar
  1666.     with the key concepts in this chapter, you'll have an adequate
  1667.     background for doing the more complicated editing and formatting
  1668.     operations described in later chapters.
  1669.  
  1670.     Word Processors -vs- Typewriters
  1671.  
  1672.          For those of you new to word processing, keep in mind that you
  1673.     don't have to learn anything new about typing in order to use Surefire.
  1674.     Although many typists think that keystroking feels more natural on an
  1675.     electric typewriter than on a computer keyboard, the fingering for each
  1676.     is almost exactly the same.  This is because the keyboard for the IBM PC
  1677.     and their "clones" or "compatibles" was designed from the popular IBM
  1678.     Selectric.
  1679.  
  1680.          The extra keys on the main part of the IBM PC keyboard (Esc, Ctrl
  1681.     and Alt) are called "control keys".  The name is slightly misleading
  1682.     because these keys don't control anything. Instead, they are used in
  1683.     conjunction with other keys to send commands or perform special
  1684.     functions.  For example, pressing both the control key and the backspace
  1685.     key at the same time will erase a word, while pressing the backspace key
  1686.     alone will erase a single character.  Therefore, the control keys make
  1687.     it possible for other keys to have more than one function.
  1688.  
  1689.          Another difference between the computer keyboard and a typewriter
  1690.     is the extra keys on the right and left sides of the main typing area.
  1691.     On most keyboards, on the right side has a numeric key pad.  Often, the
  1692.     number keys double as cursor-control keys as well.  If you have this
  1693.     kind of keyboard, a key called "Num Lock" will switch you between using
  1694.     the key pad for entering numbers and using it for cursor control.  You
  1695.     will know which "mode" your keyboard is in if you see a light above the
  1696.     key pad.  On most, when the light is on, the number keys are active, and
  1697.     when the light is off, the arrow keys are active.  If your keyboard is
  1698.     of this variety, Surefire will operate more efficiently if you use these
  1699.     keys for cursor movement only, and use the main keyboard for entering
  1700.     numbers.  Some of the more upscale keyboards keep the cursor-control
  1701.     keys separate from the numeric key pad, so you don't have to use the
  1702.     same keys for both.
  1703.  
  1704.          The function keys are found either to the left side or above the
  1705.     main set of keys.  They are usually marked "F1", "F2", "F3". . .
  1706.     Keyboards with the function keys along the left edge usually have 10
  1707.     function keys, while keyboards with the keys across the top have 12.
  1708.     Each key has a different meaning depending on whether you press the key
  1709.     alone or in combination with either the (ALT) or (Shift) control keys.
  1710.  
  1711.                           Copyright (c) 1993 Piaf, Inc.
  1712.  
  1713.     Surefire S2.0 User's Guide                                       Page 30
  1714.  
  1715.          For help on learning which keys to press when, look at the Hints
  1716.     displayed at the bottom of the screen for suggestions. You view Hints by
  1717.     pressing (Shift+F10).  Pressing (Shift+F10) again will hide the Hints.
  1718.  
  1719.     Creating a New Document
  1720.  
  1721.          When you start Surefire for the first time, the screen displays a
  1722.     representation of the upper portion of a blank 8 1/2 x 11 sheet of
  1723.     paper. The cursor is the blinking horizontal line, and starts out in the
  1724.     upper left-hand corner of a new document.  The grey area is the margin,
  1725.     and the blank space is the typing area.
  1726.  
  1727.          As you type on the keyboard, text is inserted to the left of the
  1728.     cursor as the cursor moves from left to right.  If you make a mistake,
  1729.     the (Backspace) key will erase one character at a time to the left of
  1730.     the cursor. You can press (Enter) to move to the start of the next line.
  1731.  
  1732.     Saving Your Document
  1733.  
  1734.          When you're done typing, bring up the Save window from the File
  1735.     menu to save your text.  Saving your file will store what you typed   on
  1736.     a permanent medium such as a floppy or hard disk.  Since you are saving
  1737.     the document for the first time, you will need to give it a name.  In
  1738.     the "Name:" data entry field, type in any name up to eight characters.
  1739.     When you are done typing the name, press (Ctrl + Enter) to close the
  1740.     window.  This will return the cursor to where you last were in your
  1741.     document.
  1742.  
  1743.          Your document's name is displayed on the status line and the text
  1744.     you typed remains on the screen after you save it so that you can
  1745.     continue working on it. It is a good idea to save your typing on disk
  1746.     about every 15 minutes or so.  This ensures that your work will not be
  1747.     lost if the power goes out or you leave your computer unattended.
  1748.  
  1749.     Cursor Movement
  1750.  
  1751.          If Surefire forced you to start every page in the upper left-hand
  1752.     corner, and required you to erase all mistakes by backspacing, it
  1753.     wouldn't be a very useful program.  Luckily, this isn't the case, as
  1754.     you can start typing anywhere on the page by moving the position of the
  1755.     cursor to the desired location.  In addition, there are many other times
  1756.     when you'll want to move the cursor--when inserting, deleting,
  1757.     relocating text, and reformatting paragraphs--to name a few.
  1758.  
  1759.          In Surefire the cursor keys (arrow keys, Home, End, Page up and
  1760.     Page down) change your typing position, while the Spacebar, Tab, Enter
  1761.     and Backspace keys actually modify the text when pressed.  For example,
  1762.     typing (Spacebar) will give you a blank character, while pressing (Right
  1763.     arrow) will move the cursor over one position on the screen without
  1764.     changing the text in any way.  Pressing (Backspace) will erase a
  1765.     character, while pressing (Left arrow) will move the cursor over one
  1766.     space.  Likewise, typing (Enter) will put the cursor at the beginning of
  1767.     the next line, but pressing (Down arrow) will move the cursor down one
  1768.     line while keeping the left-right orientation of the cursor the same.
  1769.  
  1770.                           Copyright (c) 1993 Piaf, Inc.
  1771.  
  1772.     Surefire S2.0 User's Guide                                       Page 31
  1773.  
  1774.          In this chapter we are concentrating on the basics of typing a
  1775.     simple document, so our discussion is limited to only what you need to
  1776.     know for making small changes while entering text.  When you start doing
  1777.     major revisions in the next chapter, you'll encounter a complete
  1778.     presentation of the cursor keys in action.
  1779.  
  1780.     Entering Text
  1781.  
  1782.          One difference between entering text into a word processor and
  1783.     typing on a typewriter is that a word processor makes pressing (Enter)
  1784.     at the end of every line optional.  The choice is based on whether you
  1785.     are typing while using automatic Word Wrap.
  1786.  
  1787.          Surefire's Word Wrap determines what happens when you reach the end
  1788.     of the line while typing text.  When Word Wrap is off, you will find
  1789.     that Surefire operates like a typewriter because it will not let you
  1790.     type characters beyond the right margin.  To continue typing, you can
  1791.     either press the (Enter) key or reposition the cursor using the arrow
  1792.     keys.  In contrast, if you reach the end of the line when Word Wrap is
  1793.     on, you will be able to continue typing since the cursor automatically
  1794.     moves to the beginning of the next line.  When in Insert mode, the word
  1795.     you are currently typing will also automatically jump down to the
  1796.     beginning of the next line along with the cursor.  This means that if
  1797.     there is not enough room on the end of the line for a complete word to
  1798.     fit, Surefire will automatically move the last whole word you type to
  1799.     the beginning of the next line without you having to press (Enter).
  1800.  
  1801.          When entering text using Typeover mode while Word Wrap is on, only
  1802.     the cursor moves to the next line.  For example, if you are entering a
  1803.     table where the last column is aligned flush right, you can start
  1804.     entering the next row without pressing (Enter).  This is done by typing
  1805.     text or pressing the (Tab) key until the cursor automatically moves to
  1806.     the first character of the next line.
  1807.  
  1808.          As you can see, Word Wrap is a convenient feature.  You no longer
  1809.     need to press the (Enter) key in anticipation that the word you are
  1810.     about to type will not fit on the line.  With Word Wrap, your typing
  1811.     speed and concentration are greatly improved as you don't have to be
  1812.     constantly watching the screen to see where to type (Enter).
  1813.  
  1814.          Although Word Wrap makes typing paragraphs much easier, there are
  1815.     still many tasks for which Word Wrap is not suitable.  Tables,
  1816.     letterheads, diagrams, charts, and forms are some examples of documents
  1817.     best done without Word Wrap.  This is why Surefire gives you both modes.
  1818.  
  1819.  
  1820.  
  1821.  
  1822.  
  1823.  
  1824.  
  1825.  
  1826.  
  1827.  
  1828.  
  1829.                           Copyright (c) 1993 Piaf, Inc.
  1830.  
  1831.     Surefire S2.0 User's Guide                                       Page 32
  1832.  
  1833.     "Wrapped" and "Unwrapped" Paragraphs
  1834.  
  1835.          Whether you want to use Word Wrap while typing text or not, each
  1836.     paragraph you enter will be either "wrapped" or "unwrapped".  In a
  1837.     "wrapped" paragraph, all the words are arranged to completely fill up
  1838.     each line.  A line that is "unwrapped" has extra space on the right that
  1839.     could be "filled-in" with words "wrapped up" from the lines below it.
  1840.     In addition, entering or editing text in Insert mode with Word Wrap on
  1841.     automatically results in "wrapped" paragraphs.
  1842.  
  1843.          Sometimes you may want to "wrap" together "unwrapped" text.  To
  1844.     force an "unwrapped" paragraph to become "wrapped", move the cursor to
  1845.     the end of the first line of the paragraph, press (ALT+W) until a 'W' is
  1846.     displayed in the status line to turn Wrap on, and then press (Delete).
  1847.  
  1848.          In Surefire, a paragraph is separated from the next paragraph by a
  1849.     blank line or a line that is indented at least one character from the
  1850.     left margin.  An indented line also indicates the start of another
  1851.     paragraph.  When you force an "unwrapped" paragraph to "wrap", the
  1852.     paragraph is reformatted up to the start of the next paragraph.
  1853.  
  1854.     Typeover and Insert modes
  1855.  
  1856.          Surefire gives you two modes for editing text, Typeover and Insert.
  1857.     As a general rule of thumb, Typeover mode is better suited for replacing
  1858.     text that is already there with something else. Insert mode is more
  1859.     appropriate for adding text to a line while retaining the text that is
  1860.     already on the line.
  1861.  
  1862.        Using Typeover Mode
  1863.  
  1864.          Whenever you type text in Typeover mode, all old characters vanish
  1865.     as you type new ones on top of them.  Therefore, you can type directly
  1866.     on top of text, without having to worry about removing the characters
  1867.     underneath.  This makes editing some documents such as forms and tables
  1868.     easy and convenient.
  1869.  
  1870.          There are times when you will want to type on top of a larger
  1871.     section of "wrapped" text.  The best way is to remove the unwanted
  1872.     section of text and then insert the new text in Insert mode with Word
  1873.     Wrap on.  You will learn how to edit text this way in "Chapter 5:
  1874.     Revising a Document".
  1875.  
  1876.        Using Insert Mode
  1877.  
  1878.          Correcting missing letters, spaces, words, or punctuation marks is
  1879.     simple in Insert mode: you merely position the cursor one character to
  1880.     the right of where you need to add text, and type the new text.  As you
  1881.     type, the letters to the right are moved further to the right, to make
  1882.     room for the text  you insert.  Because of this, Insert mode is more
  1883.     suitable for "wrapped" text, but it will also work for "unwrapped" text
  1884.     if the amount of text is small. What happens at the end of the line
  1885.     depends on whether you are inserting while using Word Wrap mode or not.
  1886.  
  1887.  
  1888.                           Copyright (c) 1993 Piaf, Inc.
  1889.  
  1890.     Surefire S2.0 User's Guide                                       Page 33
  1891.  
  1892.          Word Wrap together with Insert mode allows for quick paragraph
  1893.     entry, while Typeover mode is best for typing forms, charts and tables.
  1894.     Keep in mind, that you can have both "wrapped" and "unwrapped" text in
  1895.     the same document, as in the example of a report with a "unwrapped"
  1896.     chart inserted between "wrapped" paragraphs.  Depending on the kind of
  1897.     task you are doing in Surefire, you may want to stick to one mode, or
  1898.     use a combination.
  1899.  
  1900.     Deleting Characters
  1901.  
  1902.          It often happens that while typing a phrase, you think of a better
  1903.     phrase to use instead.  Perhaps the first phrase is a little wordy or
  1904.     confusing, seems inappropriate at the time, or doesn't express your
  1905.     point directly enough.  For times like these when you are deleting small
  1906.     amounts of text, you can use the (Backspace) and (Delete) keys or
  1907.     typeover text in Typeover mode.  When you want to remove larger areas,
  1908.     you will need to use the other methods discussed in "Chapter 7:
  1909.     Clipboard Editing".
  1910.  
  1911.          Whenever you want to remove text to the left of the cursor, use the
  1912.          (Backspace) key.
  1913.  
  1914.          Whenever you want to remove text at the cursor, use (Delete).
  1915.  
  1916.          Keep in mind that deleting text gives you different results
  1917.     depending on whether you are working with Word Wrap or not.  In Word
  1918.     Wrap mode, the words from the next line will move up to fill in the gap
  1919.     left by the deleted text.  Otherwise, they will not.  In addition,
  1920.     because Insert and Typeover modes only control how text is added to a
  1921.     document, (Backspace) and (Delete), work the same way whether you are in
  1922.     Insert or Typeover editing modes.
  1923.  
  1924.     Exiting Surefire
  1925.  
  1926.          To exit Surefire, press (ALT+X).  When you exit you may see the
  1927.     following message:
  1928.  
  1929.          "Changes made to the current document not saved, Go ahead anyway?"
  1930.  
  1931.          If you see the above message, it is a reminder that you've changed
  1932.     your document since you last saved it, and those changes will be lost
  1933.     unless you deliberately save them.  To save your changes before
  1934.     quitting, use (Esc) to close the message window, bring up the Save
  1935.     window by pressing (ALT+F) (S).  When you see the Save window appear,
  1936.     press (Ctrl+Enter) to close the window and save the file.  If you want
  1937.     your changes saved in a different file to keep them separate from the
  1938.     previous version, type a new filename in the "Name:" text entry field
  1939.     before closing the Save window.
  1940.  
  1941.  
  1942.  
  1943.  
  1944.  
  1945.  
  1946.  
  1947.                           Copyright (c) 1993 Piaf, Inc.
  1948.  
  1949.     Surefire S2.0 User's Guide                                       Page 34
  1950.  
  1951.     Chapter 5      -    REVISING A DOCUMENT
  1952.  
  1953.          Now that you can use Surefire to type, insert and delete small
  1954.     amounts of text, you are ready to take advantage of Surefire's more
  1955.     sophisticated editing functions.
  1956.  
  1957.          If you examine the path you follow when you edit a document, you
  1958.     will discover that there's a well-defined process.  The steps are
  1959.     remarkably simple, but often look complex when you are doing them,
  1960.     simply because you are in the middle of doing detailed work.  This
  1961.     chapter will lead you through the basic steps of revising a document.
  1962.  
  1963.          Revising a document is how you'll spend many of your word
  1964.     processing hours.  When effectively used, you'll find the editing
  1965.     techniques discussed in this chapter will liberate you from much of the
  1966.     drudgery of rewriting and free you to focus your mind--not on all of the
  1967.     technical details of grinding out words--but on the crucial, exacting
  1968.     process of effective communication.
  1969.  
  1970.  
  1971.     Opening a Document
  1972.  
  1973.          The first step of revising a document is opening the version you
  1974.     wish to edit.  But before you can do this, you'll must locate the file.
  1975.     If the document is in a different directory than your current directory,
  1976.     you'll first use the Setup window to change the current directory.
  1977.  
  1978.          1. Press (ALT+F) (E) to bring display the Setup window. Press (End)
  1979.          to move it to the "Directory:" entry field. Together, the "Drive:"
  1980.          and "Directory:" fields show your current "path".  A path is the
  1981.          directions Surefire uses for locating document files.  Initially,
  1982.          Surefire is looking in its home directory.  Type the name of the
  1983.          appropriate directory here and press (Ctrl+Enter) to close the
  1984.          window and accept the new path.
  1985.  
  1986.          2. Press (ALT+F) (G) to display the Get window. To display a list
  1987.          of all of the files in the current directory, press (ALT+Z).  Use
  1988.          the arrow keys to scroll the list until the cursor is positioned on
  1989.          the right document.  Press (Enter) and then (Ctrl+Enter) to close
  1990.          the "Get" window and load the document into Surefire.
  1991.  
  1992.          You should develop some kind of organizational system to manage all
  1993.     of your files.  For example, you may want to group all of your letters
  1994.     in one subdirectory, sales documents in  another, and proposals in a
  1995.     third.  It doesn't really matter what system you use as long as you can
  1996.     quickly locate the file you need.  For more information on organizing
  1997.     files, see "Chapter 24: More About Surefire Documents" found later in
  1998.     the manual.
  1999.  
  2000.  
  2001.  
  2002.  
  2003.  
  2004.  
  2005.  
  2006.                           Copyright (c) 1993 Piaf, Inc.
  2007.  
  2008.     Surefire S2.0 User's Guide                                       Page 35
  2009.  
  2010.     Printing a Document
  2011.  
  2012.          Now that you've opened your document, you're ready to see what it
  2013.     looks like on paper.  However, before you can print, you'll need to make
  2014.     sure that your printer is ready, and Surefire knows the kind of printer
  2015.     you have and what port it is connected to.
  2016.  
  2017.        Preparation
  2018.  
  2019.          Before you print your first document in Surefire, you'll need to
  2020.     take these preliminary steps.  Unless you change printers or have an
  2021.     unusual print job, you'll never need to do these steps again.
  2022.  
  2023.          1.  Check your hardware. Make sure that your printer is properly
  2024.          connected to your PC, has paper loaded, is plugged in, and is
  2025.          turned on.  For additional information on printer setup, see
  2026.          "Chapter 2: Getting Started" and "Chapter 23: More About Printing".
  2027.  
  2028.          2.  Press (ALT+F) (E) to display the Setup window.
  2029.  
  2030.          3.  Move the cursor to the "Printer is" multiple choice button by
  2031.          pressing the (End) key twice.
  2032.  
  2033.          4.  Check the printer name. If your printer is different than the
  2034.          one displayed, continue to step 5.  If your printer is the same
  2035.          continue to step 6.
  2036.  
  2037.          5.  Choose a printer. Zoom the button to see a list of supported
  2038.          printers by pressing (ALT+Z).  Use the (up and down arrow) keys to
  2039.          move the cursor in the list.  When the cursor lands on the name of
  2040.          your printer, press (Enter). If you don't see the name of your
  2041.          printer listed, choose the name of a printer that is compatible
  2042.          with your printer.  You may need to refer to "Chapter 23: More
  2043.          About Printing" to choose the appropriate printer.
  2044.  
  2045.          6.  Choose a port. When you connected the printer to your PC, you
  2046.          did so via a printer cable.  The printer port is the place on the
  2047.          back of the PC that is connected to the cable.  Printer ports come
  2048.          in two varieties:  parallel and serial.  The type you use depends
  2049.          on whether you have a parallel or serial printer.  For printing to
  2050.          work correctly, your printer and PC port must match, as a parallel
  2051.          printer will only work when plugged into a PC parallel port and a
  2052.          serial printer will only work with the associated PC serial port.
  2053.          If your printer can operate in either serial or parallel mode, you
  2054.          must tell your printer in some fashion which kind of port it is on
  2055.          the other end of the cable.  Read your printer manual for this.
  2056.  
  2057.          If you know what port your printer is connected to, and it isn't
  2058.          the one displayed, bring up the list of possibilities by pressing
  2059.          (ALT+Z).   Choose one of the ports in the list by using the (up and
  2060.          down arrow) keys to change the position of the cursor in the list.
  2061.          Press (Enter) to make your selection.  If you don't know what port
  2062.          your printer is connected to, read the information in "Chapter 2:
  2063.          Getting Started" about hardware connections before continuing.
  2064.  
  2065.                           Copyright (c) 1993 Piaf, Inc.
  2066.  
  2067.     Surefire S2.0 User's Guide                                       Page 36
  2068.  
  2069.          7.  Save the Setup configuration. Move the cursor to the "SAVE"
  2070.          action button by pressing (End).  Press (Enter).  This will close
  2071.          the Setup window and save your printer selections.  Unless you
  2072.          change printers or ports, you will not have to prepare Surefire for
  2073.          printing again before printing.
  2074.  
  2075.        Printing
  2076.  
  2077.          Whenever you print, there are some considerations that you should
  2078.     keep in mind.  What paper size you are using?  What size characters do
  2079.     you want to print?  How much space do you want for the margins?  How
  2080.     long do you want to wait for it to print?  How many copies?  Which page
  2081.     do you want to start with?
  2082.  
  2083.          To make this easier, you should experiment with the default printer
  2084.     settings and formatting.  If you don't like how the printout looks, you
  2085.     can adjust the settings to suit your own preferences.  For information
  2086.     on customizing Surefire's formatting and printing settings, read
  2087.     "Chapter 9: Page Layout".
  2088.  
  2089.          Follow these basic steps to print a document:
  2090.  
  2091.          1.  Press (ALT+F) (P) to display the Print window.
  2092.  
  2093.          2.  Start printing. Normally the cursor is found on the "PRINT"
  2094.          action button when the window first comes up.  Press (Enter) to
  2095.          begin printing.  If the cursor is found somewhere else, press (End)
  2096.          or (Home) until the cursor is over "PRINT".
  2097.  
  2098.          3.  Notice the Print Message. If you are prepared to print, you
  2099.          should see the Print Message.  It indicates that Surefire is
  2100.          sending information to the printer.
  2101.  
  2102.          4.  Notice that Surefire changes pages while printing. As the
  2103.          document prints, Surefire displays the page that is currently being
  2104.          sent to the printer.  When all of the pages have been sent, the
  2105.          message disappears, and you see the last page of the document.
  2106.  
  2107.          5.  Not Printing? If you see the Print Message, but nothing happens
  2108.          even after waiting awhile, check the following: Your printer is not
  2109.          configured correctly, you have selected the wrong printer or port
  2110.          in the Setup window, or the cable is not connected correctly.
  2111.  
  2112.  
  2113.     Scrolling
  2114.  
  2115.          Whenever you revise a document, you usually start by scribbling
  2116.     corrections and comments in the margins of the paper copy.  After you've
  2117.     decided which redundant sentence to omit, what word is too formal, and
  2118.     what paragraph is to be moved, the next step is usually scrolling
  2119.     through the text on the screen to locate the sections that need
  2120.     modification.
  2121.  
  2122.  
  2123.  
  2124.                           Copyright (c) 1993 Piaf, Inc.
  2125.  
  2126.     Surefire S2.0 User's Guide                                       Page 37
  2127.  
  2128.          To make locating text easier, you might find it helpful to mark the
  2129.     sections on the printed copy with a highlight marker so you can quickly
  2130.     glance at them while scrolling.  Furthermore, if you are going to spend
  2131.     a lot of hours word processing, we recommend you use some kind of stand
  2132.     to hold your printed copy upright next to your computer screen.  This
  2133.     saves time and prevents neck strain because you don't have to take your
  2134.     eyes off of the screen to look down.  Attach a spring clip or clothes
  2135.     pin to the top of a clear plastic recipe book stand for a cheap and very
  2136.     effective copy holder.
  2137.  
  2138.          But what if your printer is like the Diablo 630 and takes four
  2139.     minutes to print a page, and you don't have time to wait that long after
  2140.     each revision?  People with slower printers find it faster to review and
  2141.     revise their document at the same time in Surefire--scrolling and
  2142.     editing as they go.  However, keep in mind that for many people,
  2143.     proofreading on the screen isn't as effective as proofreading a paper
  2144.     copy.  When you can only view a third of the page at a time, it is easy
  2145.     to get a distorted perspective of your document because it is difficult
  2146.     to imagine what it reads like as a whole.  In addition, for most people
  2147.     computer screens are harder to read and looking at them for hours at a
  2148.     time is a strain on their eyes.  Therefore, if you want a refreshing
  2149.     vacation from looking at pixels, work with printed copies--but only if
  2150.     you have time to wait for the printer.
  2151.  
  2152.        Scrolling by Lines, Screens and Pages
  2153.  
  2154.          In the last chapter, you learned to move the cursor up and down the
  2155.     page one line at a time--an appropriate amount for entering text into a
  2156.     document.  However, when you start editing a document, learning how to
  2157.     move around in much larger units is essential.  In this section you will
  2158.     learn to move quickly from one part of the document to another so that
  2159.     you can easily locate the sections you want to edit.
  2160.  
  2161.          Think of your document as one long piece of electronic paper that
  2162.     stretches from one end to the other--something like the paper tape in an
  2163.     adding machine.  Because your monitor will only display 25 lines, you
  2164.     can only view about a third of a page at a time.  When you scroll, you
  2165.     view a different "screen", either above or below the last one viewed.
  2166.     As you advance (or back up) in the document by viewing sequential pieces
  2167.     of text, the "electronic paper" will seem to wind or unwind across your
  2168.     display.
  2169.  
  2170.          You can scroll by three amounts:  lines, screens and pages.  The
  2171.     size you use depends on how far what you want to see is from where you
  2172.     are, and how fast you want to get there.  If you advance (scrolling
  2173.     forward) by lines by pressing the (down arrow) key, "new" lines will
  2174.     constantly be appearing on the bottom of the screen, and "old" ones will
  2175.     be disappearing off of the top.  Likewise, scrolling backwards with the
  2176.     (up arrow) key reverses the movement, displaying "new" lines on the top,
  2177.     and moving the rest down to compensate.
  2178.  
  2179.          When you scroll by screens and pages, you move more quickly from
  2180.     one part of the document to another.  Once you are familiar with the
  2181.     document, you can recognize where you are by reading snippets as they
  2182.  
  2183.                           Copyright (c) 1993 Piaf, Inc.
  2184.  
  2185.     Surefire S2.0 User's Guide                                       Page 38
  2186.  
  2187.     move past.  You need to stop only when you feel you are close to the
  2188.     place you're looking for.  Then you can scroll at a slower pace, and in
  2189.     smaller chunks.
  2190.  
  2191.          Scrolling to the next "screen" (23 or 24 lines of the electronic
  2192.     paper) is done by pressing (Page Down).  Pressing (Page Up) will display
  2193.     the previous "screen".  Whenever you press (Ctrl+Page Down), you display
  2194.     the first "screen" or first part of the next page.  Likewise, (Ctrl+Page
  2195.     Up) displays the first "screen" on the previous page.
  2196.  
  2197.          In addition to using (up arrow), (Page Up) and (Ctrl+Page Up) to
  2198.     scroll backward, and (down arrow), (Page Down) and (Ctrl+Page Down) to
  2199.     scroll forward, you can also scroll to the beginning or end of the
  2200.     document by pressing (Ctrl+Home) or (Ctrl+End) respectively.
  2201.  
  2202.  
  2203.     Two Faces of Editing
  2204.  
  2205.          For those occasions when you are revising a document, you will find
  2206.     the "scroll and change" style of editing to be the most efficient way to
  2207.     get the job done.  Likewise, whenever you are reorganizing, you will
  2208.     find "cut and paste" editing a real time saver.
  2209.  
  2210.          Since the focus of this chapter is using the "scroll and change"
  2211.     method of revising text, we are going to leave the exciting world of
  2212.     "cut and paste" to another chapter--"Chapter 7:  Clipboard Editing".  If
  2213.     at this point in time, you are more interested in learning about "cut
  2214.     and paste" editing, feel free to skip ahead, as you do not need to read
  2215.     the rest of this chapter before you can learn to do clipboard editing.
  2216.  
  2217.     "Scroll and Change" Editing
  2218.  
  2219.          Whenever you scroll through a document--reading and revising as you
  2220.     go--you make changes by adding or removing text.  If you  read the last
  2221.     chapter, "Chapter 4:  Typing Text", then you already know the basics of
  2222.     moving the cursor around the screen and inserting, backspacing or
  2223.     deleting.  However, if Surefire limited you to doing only what was
  2224.     discussed in that chapter, revising documents would be painfully slow.
  2225.     Luckily, there are several key commands that really speed things up, and
  2226.     these are discussed below.
  2227.  
  2228.        Moving the Cursor on the Screen
  2229.  
  2230.          Once you've located the screen you want to view, and you spot a
  2231.     sentence you want to change, you'll need to move the cursor into
  2232.     position before you can make any changes.  As discussed in the last
  2233.     chapter, "Chapter 4: Typing Text", you move the cursor into position by
  2234.     pressing the cursor keys.
  2235.  
  2236.  
  2237.          For a summary of all of Surefire's cursor movement commands, survey
  2238.     the table on the next page:
  2239.  
  2240.  
  2241.  
  2242.                           Copyright (c) 1993 Piaf, Inc.
  2243.  
  2244.     Surefire S2.0 User's Guide                                       Page 39
  2245.  
  2246.               To Move                       Press
  2247.  
  2248.               Left one character            Left arrow
  2249.               Right one character           Right arrow
  2250.               Up one line                   Up arrow
  2251.               Down one line                 Down arrow
  2252.               Left one word                 Ctrl + Left
  2253.               Right one word                Ctrl + Right
  2254.               Start of text on the line     Home
  2255.               End of text on the line       End
  2256.               Left margin                   Ctrl + (L)
  2257.               Right margin                  Ctrl + (R)
  2258.               Scroll backwards one screen   Page Up
  2259.               Scroll forwards one screen    Page Down
  2260.               Scroll backwards one page     Ctrl + Page Up
  2261.               Scroll backwards on page      Ctrl + Page Down
  2262.               Go to beginning of document   Ctrl + Home
  2263.               Go to the end of document     Ctrl + End
  2264.  
  2265.  
  2266.        Changing Text
  2267.  
  2268.          Once you've located the text that you want to change, and have
  2269.     moved the cursor into position, the next step is to remove the old and
  2270.     replace it with the new.  Of course, in the cases where you are only
  2271.     adding text--tacking on a sentence at the end of a paragraph, adding an
  2272.     omitted word or phrase, adding a blank line to break a long paragraph
  2273.     into two paragraphs--you will not need to remove text.  Simply, type the
  2274.     addition, inserting it in front of the cursor.
  2275.  
  2276.          Keep in mind that the methods Surefire affords for adding and
  2277.     removing text, vary depending on whether you are editing using Insert or
  2278.     Typeover mode and whether Word Wrap is on or off.
  2279.  
  2280.        Removing Text
  2281.  
  2282.          In the last chapter, you saw that the (Backspace) and (Delete) keys
  2283.     are used to remove text one character at a time.
  2284.  
  2285.          Surefire also offers several methods for removing text in addition
  2286.     to (Backspace) and (Delete).  To delete the word under the cursor, you
  2287.     press (Ctrl+Backspace); to remove all the text on the line the cursor is
  2288.     currently on, you press (Ctrl+D); and to delete all the characters from
  2289.     the cursor to the end of the line, you press (Ctrl+E).
  2290.  
  2291.          As you might expect, when text is removed while Insert mode is on,
  2292.     the space that is left is "closed up".  Therefore, whenever you delete
  2293.     words or characters you will notice that any text to the right of the
  2294.     cursor moves over to fill the gap.  If Word Wrap is also on, words from
  2295.     the lines below may also "wrap up", preserving "wrapped" paragraph
  2296.     formatting.  Likewise, when a line is deleted, all lines below it are
  2297.     moved up to fill in.  This happens in any mode.
  2298.  
  2299.  
  2300.  
  2301.                           Copyright (c) 1993 Piaf, Inc.
  2302.  
  2303.     Surefire S2.0 User's Guide                                       Page 40
  2304.  
  2305.        Adding Text
  2306.  
  2307.          As discussed in the last chapter, the methods you choose to use for
  2308.     adding text may depend on whether text on the page is "wrapped" or not.
  2309.     When inserting text using Insert mode, you simply position the cursor
  2310.     one character to the right of where you want to insert text, and start
  2311.     typing.  Surefire will automatically make room for each character as you
  2312.     type and rearrange the text to accommodate the addition while there is
  2313.     still room on the line.  When Word Wrap is on, Surefire will also move
  2314.     words down to subsequent lines if necessary.
  2315.  
  2316.          You can add text in Typeover mode by either typing over blank areas
  2317.     or by replacing text that is already there.  Keep in mind that Surefire
  2318.     never does any "automatic adjustments" for you in Typeover mode.
  2319.  
  2320.        Adding and Deleting Lines
  2321.  
  2322.          In addition to removing text, the (Delete) key can also be used to
  2323.     remove blank lines and join lines and paragraphs together.  To remove
  2324.     blank lines you move the cursor to the beginning of the line, and press
  2325.     (Delete).  To join two lines, you must be in Word Wrap mode.  You move
  2326.     the cursor to the end of the first line and then press (Delete).  The
  2327.     text on the next line will "wrap up".
  2328.  
  2329.          While (Delete) can be used to join two lines together, (Enter) can
  2330.     be used to break lines apart.  Here, you simply position the cursor
  2331.     where you want the line to break and press (Enter).  All of the text to
  2332.     the right of where you pressed (Enter) will be moved to the beginning of
  2333.     the next line.  Use the same technique to "open" a line by positioning
  2334.     it on the first character of the line before pressing (Enter).
  2335.  
  2336.          You can insert a blank line between the current line and the one
  2337.     above the cursor by pressing (Ctrl+O).  This is a convenient way to put
  2338.     a blank line between two lines of text, and unlike opening a line with
  2339.     (Enter) it works in any mode.
  2340.  
  2341.  
  2342.     Good Editing Practices
  2343.  
  2344.          You will repeat the basic revision process you've encountered in
  2345.     this chapter many times to polish an important document.  Once again,
  2346.     reading through the hard-copy version of the document after each
  2347.     revision is essential.  It's just too easy to miss things on the screen
  2348.     that absolutely yell at you from the printed page.
  2349.  
  2350.          In the next chapter, you will learn faster techniques for moving
  2351.     around in the document than scrolling screen-by-screen.  Specifically,
  2352.     you will learn how to use the "Goto", "Find" and "Search and Replaces"
  2353.     commands.
  2354.  
  2355.  
  2356.  
  2357.  
  2358.  
  2359.  
  2360.                           Copyright (c) 1993 Piaf, Inc.
  2361.  
  2362.     Surefire S2.0 User's Guide                                       Page 41
  2363.  
  2364.     Chapter 6      -    LOCATING TEXT
  2365.  
  2366.          There are two ways to locate text in a document.  One you now know
  2367.     well--the laborious method of going to the beginning of the document and
  2368.     scrolling down page-by-page until you find the right spot.  An easier
  2369.     alternative is using a combination of Surefire's "Goto", "Find" and
  2370.     "Find and Replace" operations to quickly move around in a document.
  2371.  
  2372.          This chapter is designed to help you learn how to utilize these
  2373.     operations to move through the document and edit text in the fastest and
  2374.     most efficient ways.  In the first few sections we will explain how to
  2375.     use each feature.  Later, we will illustrate ways to use the operations
  2376.     to create "Bookmarks", and correct spelling mistakes and punctuation
  2377.     errors.
  2378.  
  2379.     Finding Text
  2380.  
  2381.          Sometimes you know that a paragraph or sentence needs to be
  2382.     changed, but you don't know exactly where in the document it is.  If you
  2383.     can remember some unique words that are found only in that sentence or
  2384.     paragraph, you can quickly locate it with Surefire's Find operations.
  2385.     Find searches from the cursor to the end of the document.  Therefore, to
  2386.     search the whole document, you will need to start at the beginning.
  2387.  
  2388.          Find is good for locating all of the times you discuss a point,
  2389.     refer to a person, mention a date, time or price.  To use Find, follow
  2390.     these steps:
  2391.  
  2392.          1. Press (Ctrl+Home) to go to the beginning of the document.
  2393.  
  2394.          2. Press (ALT+T) or select "Find..." from the Page menu.
  2395.  
  2396.          3. Type your text. The Find window will appear with the cursor
  2397.          already in the "Search for:" data entry field so you don't have to
  2398.          move it into position before typing.
  2399.  
  2400.          4. Choose NEXT. This will start Surefire searching for all
  2401.          occurrences of your text.
  2402.  
  2403.          After you have found the word, Surefire stores it away, and you can
  2404.     "replay" the search with either (Ctrl+P) to look backwards, or (Ctrl+N)
  2405.     to look forwards.  This makes Find fast and efficient. When there are no
  2406.     more matches of your text in the document, a message will be displayed.
  2407.  
  2408.        Finding Capitalized and Whole Words
  2409.  
  2410.          If your word is 'product', by default Surefire will find both
  2411.     "product" and "products".  Unless you specify that you want Surefire to
  2412.     search for "whole" words, it will find any occurrence of the target text
  2413.     whether or not it is embedded in longer words.
  2414.  
  2415.          To find only those occurrences that are distinct words, you "press"
  2416.     the "Part Word/Full Word" button in the Find window.  To "press" the
  2417.     button, use the (Home) key to move the cursor to "Part Word".  Press
  2418.  
  2419.                           Copyright (c) 1993 Piaf, Inc.
  2420.  
  2421.     Surefire S2.0 User's Guide                                       Page 42
  2422.  
  2423.     (Spacebar).  This will change "Part Word" to "Full Word".  Now choose
  2424.     NEXT or PREVIOUS to do your search.
  2425.  
  2426.          In addition to limiting Find to looking for whole words, you can
  2427.     ask it to find occurrences of text with the specified arrangement of
  2428.     uppercase or lowercase letters.  For example, in our "announce"
  2429.     document, "Boxes" is used differently than "boxes".  In this document,
  2430.     "Boxes" is always part of the company name, while "boxes" are what the
  2431.     company sells.  You can tell Surefire to be more discriminating by first
  2432.     entering the correct case in the "Search for:" text entry field, and
  2433.     then "pressing" the "Any Case/Exact Case" button in the same way you did
  2434.     the "Part Word/Full Word" button.
  2435.  
  2436.  
  2437.     Using Goto
  2438.  
  2439.          While "Find" helps you quickly locate words and phrases, with Goto,
  2440.     you can move the cursor to any page in the document or to the beginning
  2441.     or end. Depending on where you want to go, this can be faster than Find.
  2442.  
  2443.          For example, the paragraph that you want to change may be near the
  2444.     bottom of the document.  Instead of searching for all instances of a
  2445.     phrase, it can be faster to go directly to the bottom of the document
  2446.     and then scroll backward to the place you need to edit.
  2447.  
  2448.          To use Goto, you start by bringing up the Goto window by either
  2449.     choosing "Goto" on the Page menu or pressing (Alt+P) (G).  When the
  2450.     window appears on the screen, tell Surefire where you want to go.  If
  2451.     you want to jump to a page, type in the number in the "Page Number:"
  2452.     text entry field, and then press (Ctrl+Enter).  If you want to jump to
  2453.     the beginning or end of the document, press (End) until the cursor lands
  2454.     on the "BEGINNING" or "END" action buttons.  Press (Enter).
  2455.  
  2456.          If you chose to jump to a page or the beginning of the document,
  2457.     then the cursor will appear in the upper left-hand corner of the typing
  2458.     area, whereas if you chose to jump to the end, the cursor will appear in
  2459.     the lower left-hand corner of the last page in the document.
  2460.  
  2461.          If you want to bypass bringing up the Goto window when jumping to
  2462.     the beginning or end of the document, you can press either (Ctrl+Home)
  2463.     or (Ctrl+End).
  2464.  
  2465.  
  2466.     Using Replace
  2467.  
  2468.          While Find locates text for you, Replace gives you the ability to
  2469.     track down a target word or phrase, and substitute something else for it
  2470.     or even delete it by replacing it with nothing at all.  You access the
  2471.     Replace window from the Page menu or use the shortcut, (ALT+R).  After
  2472.     Surefire is done locating all of the occurrences of text it is looking
  2473.     for, and has either replaced them or skipped over them, it will tell you
  2474.     how many replacements it made and inform you that the replacement
  2475.     operation is completed.
  2476.  
  2477.  
  2478.                           Copyright (c) 1993 Piaf, Inc.
  2479.  
  2480.     Surefire S2.0 User's Guide                                       Page 43
  2481.  
  2482.          Like Find, Replace locates a specified group of characters that you
  2483.     enter in the "Search For:" field.  When specifying what to search for,
  2484.     you can also direct Replace to find only the text that matches the
  2485.     combination of upper and lowercase text you typed, or find whole or
  2486.     partial words.  However, instead of parking the cursor at the beginning
  2487.     of the located text, Replace lets you substitute it with whatever you
  2488.     entered in the "Replace With:" text entry field in the Replace window.
  2489.     In addition, you can choose to either verify each replacement or have
  2490.     Replace make the substitution throughout the entire document.
  2491.  
  2492.          Replace differs from Find in that it can only search forward (there
  2493.     is no equivalent to "PREVIOUS").  If you want to locate all occurrences
  2494.     of the text, you must start at the beginning of the document.
  2495.  
  2496.          One of the biggest advantages of Surefire's Replace operation is
  2497.     that you can have it verify changes before it makes them by choosing
  2498.     "ASK & REPLACE". After you close the Replace window, Surefire will
  2499.     locate the first occurrence of your text and select it on the screen.
  2500.     In addition, the "Ask & Replace" window will appear.  On the left-hand
  2501.     side it shows you what it found and what you specified as the
  2502.     replacement. Press (End) to move the cursor to the "REPLACE" action
  2503.     button Press (Enter).  This will make the substitution on the screen.
  2504.  
  2505.          "ASK & REPLACE" is necessary when searching for and replacing words
  2506.     that could be imbedded in other words.  There are times when it is
  2507.     disadvantageous to search for whole words because you may want to
  2508.     replace some imbedded occurrences and not others.  For example, suppose
  2509.     you were substituting all occurrences of "cash" with "dollars", and for
  2510.     some reason didn't want to set the Replace window "Part Word/Full Word"
  2511.     logical choice button to "Full Word".  When looking for partial words,
  2512.     Surefire would also find "cash" in "cashier".
  2513.  
  2514.          If instead of using "ASK & REPLACE", you chose to use "REPLACE
  2515.     ALL", Surefire would have found each instance of "cash" and substituted
  2516.     in "dollars" for it.  Therefore, "cashier" would become "dollarsier".
  2517.     To prevent problems like these, Surefire lets you choose to replace a
  2518.     word or skip over it in the "Ask & Replace" window.
  2519.  
  2520.          Now that you understand the general uses of Replace, Goto and Find,
  2521.     you're ready to see how they are used in specific situations.  The
  2522.     remaining half of this chapter concentrates on practical uses of these
  2523.     operations such as creating Bookmarks, correcting spelling errors, and
  2524.     changing punctuation errors.
  2525.  
  2526.  
  2527.     Locating Text Using Bookmarks
  2528.  
  2529.          When revising documents, you'll often find yourself going on
  2530.     several editing tangents.  For example, while you're editing a section
  2531.     on marketing strategies, you may start thinking about customer
  2532.     preferences.  If customer preferences are  discussed in another section,
  2533.     this often means jumping to that section, typing in your thoughts before
  2534.     you forget them, and then jumping back again to marketing strategies.
  2535.  
  2536.  
  2537.                           Copyright (c) 1993 Piaf, Inc.
  2538.  
  2539.     Surefire S2.0 User's Guide                                       Page 44
  2540.  
  2541.          Like paper bookmarks, creating "Bookmarks" in Surefire allows you
  2542.     to move quickly to another place in the document without loosing your
  2543.     place.  Incidentally, using Bookmarks is not a technique unique to
  2544.     Surefire.  It is often found as a built-in feature offered by many
  2545.     high-priced, dedicated, word processors.  But, when you use the basic
  2546.     Find operation, you can get the same results in an integrated program
  2547.     like Surefire.
  2548.  
  2549.          To create a bookmark, all you need to do is to type a unique string
  2550.     of characters (such as "**") on a blank line near the text you are
  2551.     currently editing.  Then, search either backwards or forwards for a word
  2552.     or short phrase you know is found near some other place you want to
  2553.     locate.  When the Find operation locates the target spot, simply type
  2554.     the same characters as you used for the other Bookmark on a blank line
  2555.     nearby.  Now you can zip back and forth between the two Bookmarks by
  2556.     searching forwards or backwards for the unique string.  When you're done
  2557.     using the Bookmark, "search and destroy" it using Replace.
  2558.  
  2559.          The mechanics of using Bookmarks are easy and intuitive.  To search
  2560.     for your Bookmark in Surefire, simply press (ALT+T) to bring up the Find
  2561.     window.  In the "Search for:" text entry field type your bookmark
  2562.     string.  Then press (End) either once or twice to position the cursor on
  2563.     "NEXT" or "PREVIOUS" depending on whether you want to search to the end
  2564.     of the document or back to the beginning.  As you learned earlier in
  2565.     this chapter, the next time you want to search for the Bookmark, you can
  2566.     do so without bringing up the Find window.  You simply press either
  2567.     (Ctrl+N) to find the next Bookmark, or (Ctrl+P) to find the previous
  2568.     one.
  2569.  
  2570.          When you want to remove Bookmarks so that they're not printed in a
  2571.     final draft, you eliminate them by using Replace.  To do this, bring up
  2572.     the Replace window by pressing (ALT+R).  In the "Search for:" text entry
  2573.     field, type the unique string identifying the Bookmark.  Then, press
  2574.     (End) to move to the REPLACE ALL action button (the "Replace With:"
  2575.     field will be left blank).  Press (Enter) to close the window, and
  2576.     Surefire will remove the Bookmarks.
  2577.  
  2578.          If you find using Bookmarks to be well suited to the way you think,
  2579.     you may want to develop a Bookmarking system.  To move among several
  2580.     locations in the text, you can develop a numbering system for the
  2581.     Bookmarks.  For example, if you find "**" exceptionally appealing, you
  2582.     base a system on it such as "**1", **2, **3, or "**", "***", "****".
  2583.  
  2584.          For really complex documents, you may want to use a variety of
  2585.     unique strings for Bookmarks--such as "**", "XX", "%%", and "##"--to
  2586.     designate different Bookmarks for different chores.  For example, in a
  2587.     report, "**" could mark all of the places where you discuss marketing
  2588.     strategies, while "XX" could identify places where you examine consumer
  2589.     preferences.  If a system like this is appropriate for the document
  2590.     you're writing, be sure to include a list at the beginning of the
  2591.     document so that you won't forget what each Bookmark stands for.
  2592.  
  2593.  
  2594.  
  2595.  
  2596.                           Copyright (c) 1993 Piaf, Inc.
  2597.  
  2598.     Surefire S2.0 User's Guide                                       Page 45
  2599.  
  2600.     Chapter 7      -    CLIPBOARD EDITING
  2601.  
  2602.     The Clipboard
  2603.  
  2604.          In Surefire, as in most modern word processors, the Clipboard is
  2605.     simply a way to think of a place in memory that stores selected pieces
  2606.     of your document.  Like a real clipboard, its function is to hold things
  2607.     until they are used elsewhere.  Like many things which are just places
  2608.     in memory, you can't see the Clipboard, although you can see the objects
  2609.     it stores.  For example, if you Cut a piece of text to the Clipboard,
  2610.     the text is removed from its former place in the document and is stored
  2611.     in the Clipboard memory exactly as it was displayed on the screen.
  2612.     Whenever you Cut or Copy something to the Clipboard, you will see this
  2613.     piece highlighted on the screen and displayed as an object.
  2614.  
  2615.          Once a piece of text becomes a Clipboard object, you can place it
  2616.     anywhere inside the margins of the document. To do this, you simply
  2617.     "paste" it.  Unlike other software programs where you can store only one
  2618.     object on the Clipboard at a time, Surefire allows you to store any
  2619.     number. This way, if you add a new object, the old one is still around.
  2620.     This prevents you from loosing the last thing you Cut, and allows you to
  2621.     Cut or Copy multiple objects from the same page where they wait for
  2622.     relocation until you're ready to use them on another page or into
  2623.     another document.  This aspect of Surefire's word processor makes it
  2624.     behave more like a desk-top publishing program than a simple word
  2625.     processor.
  2626.  
  2627.          In the following sections, we will describe in detail the mechanics
  2628.     of using each Clipboard operation--Block Select, Line Select, Cut, Copy,
  2629.     Paste, and Paste & Keep.  We will discuss Delete since it shares the
  2630.     same techniques with Clipboard editing operations, even though it
  2631.     doesn't use the Clipboard.
  2632.  
  2633.        Clipboard Commands
  2634.  
  2635.          In Surefire, the mechanics of "cut-and-paste" editing are easy and
  2636.     intuitive:  you first select the piece of text you want to relocate, and
  2637.     then choose either Cut or Copy from the Editing menu (ALT+E).  Both Cut
  2638.     and Copy replicate the text you selected into a space in the computer's
  2639.     memory called the Clipboard.  The replica is called a Clipboard object.
  2640.     Cut differs from Copy in that Cut removes the selected text from the
  2641.     document when the clipboard replica is made, while Copy leaves the
  2642.     selected text where it is.  Delete acts like Cut but it doesn't make a
  2643.     replica on the Clipboard.  Instead the text vanishes from the document,
  2644.     and can be recovered by using Undelete as discussed in Chapter 5.
  2645.  
  2646.          After you have Cut an object to the Clipboard, you can "paste" it
  2647.     back into the document once you've located where in the document you
  2648.     want to put it.  To do this, you execute Paste, and Surefire takes the
  2649.     replica off of the clipboard and puts it back into the document in the
  2650.     new location.  Paste & Keep acts just like Paste except that the
  2651.     Clipboard object remains on the Clipboard after pasting.
  2652.  
  2653.  
  2654.  
  2655.                           Copyright (c) 1993 Piaf, Inc.
  2656.  
  2657.     Surefire S2.0 User's Guide                                       Page 46
  2658.  
  2659.     Selecting Text
  2660.  
  2661.          Before you can Cut or Copy a piece of text, you'll have to specify
  2662.     to Surefire which piece of text to Cut or Copy.  You do this by
  2663.     selecting it.  Surefire has two methods of selecting text:  Block Select
  2664.     and Line Select.
  2665.  
  2666.        Block Select -vs- Line Select
  2667.  
  2668.          You decide whether to use Block Select or Line Select by looking at
  2669.     the nature of the text you are selecting.  The general guideline is to
  2670.     use Block Select for tables, charts and forms and Line Select for
  2671.     sentences and paragraphs.  In addition, the method you choose also
  2672.     depends on what you want to happen when the text is pasted at a later
  2673.     time.  When you paste Block selected text, it overwrites what is
  2674.     underneath it; whereas, when you paste Line selected text, it is
  2675.     inserted into the existing text.
  2676.  
  2677.          Just as its name implies, Block Select selects a rectangular area.
  2678.     always starting in the upper left-hand corner of the area you want to
  2679.     select, and always including the character under the cursor. Block
  2680.     select is ideal for manipulating forms and tables.  For example, if you
  2681.     wanted to interchange two columns of a table, you would choose to use
  2682.     Block select.  The largest block you can select is a page.
  2683.  
  2684.          In contrast, Line Select gives you the ability to select all the
  2685.     text between two specified points.  Therefore, you can select any text
  2686.     in the document including several words, a phrase, sentences,
  2687.     paragraphs, or even several pages.
  2688.  
  2689.        Selecting a Region With Block Select
  2690.  
  2691.          Move the cursor to the upper left corner of the block to be
  2692.     selected.  Choose Block Select from the Edit menu or press (ALT+B) to
  2693.     mark the starting point for the selection.  When the beginning of a
  2694.     selection is marked in this fashion, it will become highlighted.
  2695.     Using the (down and right arrow) keys, move the cursor to the bottom
  2696.     right corner of the area you want selected. As you do this, you will see
  2697.     the screen highlight all the text in a rectangle between the starting
  2698.     point of the block and the present location of the cursor. When you have
  2699.     the desired rectangle highlighted, you have selected the block.
  2700.  
  2701.          When you select a block, Surefire expects you to do something with
  2702.     it.  You can cut, copy or delete it. Each of these operations are
  2703.     available on the Edit menu. Cut (ALT+F1) removes the Block from its
  2704.     present location and puts a replica on a Clipboard.  If you chose to use
  2705.     Copy (ALT+F2), it also puts a replica on the Clipboard, but keeps the
  2706.     selected area where it is in the document.  Delete (ALT+E) (D)
  2707.     obliterates the Block from the document without making a replica.
  2708.  
  2709.  
  2710.  
  2711.  
  2712.  
  2713.  
  2714.                           Copyright (c) 1993 Piaf, Inc.
  2715.  
  2716.     Surefire S2.0 User's Guide                                       Page 47
  2717.  
  2718.          Cut (ALT+F1) is the best choice to move text from one area in the
  2719.     document to another.  Once the Block has been Cut, you will see it
  2720.     displayed as a Clipboard object on the screen.  The cursor will be
  2721.     inside the object, and you will be able to move the object around the
  2722.     screen using the arrow keys. To return the cursor to the document, press
  2723.     (F6).  This "hides" the Block selected Clipboard object. You will see
  2724.     how to Paste a block later in this chapter.
  2725.  
  2726.          Cutting Block selected text will always leave white space behind
  2727.     just as if you typed in rows of Spacebar characters in Typeover mode.
  2728.     In contrast, cutting Line selected text results in having the text below
  2729.     the cut "wrap up" to fill in the hole.
  2730.  
  2731.        Selecting Sentences With Line Select
  2732.  
  2733.          To make a line selection, always start in the upper left-hand
  2734.     corner of the area you want to select.  The selection includes the
  2735.     character under the cursor.  Press (ALT+L) or choose Line Select from
  2736.     the Edit menu to mark this character as the starting point for the
  2737.     selection.
  2738.  
  2739.          By pressing the (down arrow), (Ctrl + right arrow) and (left arrow)
  2740.     keys, move the cursor to the period at the end of a sentence.  As you do
  2741.     this, you will see the screen highlight all the text between the
  2742.     starting point of the selection and the present location of the cursor.
  2743.     When you are at the period, you have selected the sentence.  Keep in
  2744.     mind that with Line select, once you have moved the cursor one line
  2745.     below the starting point, you can move the cursor either right or left.
  2746.  
  2747.          As with Block select, once you've selected a piece of text,
  2748.     Surefire expects a Cut, Copy or Delete command to follow.  So, don't
  2749.     choose Delete.  Instead, use Cut or Copy and a Clipboard object will
  2750.     appear on the screen.  The cursor will be inside the object, and you
  2751.     will be able to move the object around the screen using the arrow keys.
  2752.     Return the cursor to the document by pressing (F6).
  2753.  
  2754.          Note:   When using Line select to select short line paragraphs
  2755.     (e.g. lists), you must turn Wrap off to preserve the formatting of the
  2756.     lists. See "Chapter 9: Page Layout" for more information on paragraphs.
  2757.  
  2758.        Return to Normal Operations
  2759.  
  2760.          In addition to having a chance to compare how selecting text using
  2761.     Line select differs from selecting rectangular regions with Block
  2762.     select, you also learned how to view and hide objects on the screen.
  2763.     Surefire requires you to hide objects before you can do normal
  2764.     operations in the document such as typing and scrolling.  To do this,
  2765.     press (F6).  To view the Clipboard object again, press (F6) again.
  2766.  
  2767.  
  2768.  
  2769.  
  2770.  
  2771.  
  2772.  
  2773.                           Copyright (c) 1993 Piaf, Inc.
  2774.  
  2775.     Surefire S2.0 User's Guide                                       Page 48
  2776.  
  2777.        Canceling a Selection
  2778.  
  2779.          Sometimes you may change your mind and want to cancel your
  2780.     selection.  Just as with canceling other Surefire operations, you
  2781.     simply press (Esc).  In addition, we recommend that you choose to view
  2782.     the "Hints" at the bottom of the screen for help with remembering what
  2783.     keys to press while doing Clipboard editing, as many of the operations
  2784.     are not available from a menu.  To view the "Hints", press (Shift+F10).
  2785.  
  2786.  
  2787.     Selection with the Mouse
  2788.  
  2789.          You can perform all types of selection conveniently with the mouse.
  2790.     The following paragraphs explain how.
  2791.  
  2792.        Block Selection
  2793.  
  2794.          To make a block selection, Move the mouse to the upper left corner
  2795.     of the area to be selected and Click. This positions the page cursor to
  2796.     indicate where the block selection will begin. Now choose Block Select
  2797.     from the Edit menu. You may then define the extent of the selection by
  2798.     Dragging or Clicking.
  2799.  
  2800.          You may Drag the mouse to the right or down from the starting point
  2801.     you set above. Make sure the mouse cursor is on the starting point, then
  2802.     press and hold the left mouse button. As you Drag, you will change the
  2803.     shape of the selected area as long as the mouse button remains pressed.
  2804.     Holding the mouse at the edges of the document will extend the selected
  2805.     region by scrolling the document. The selection will be completed once
  2806.     you Release the mouse button.
  2807.  
  2808.          There's another way to do block selection provided you know where
  2809.     you want the lower right corner of the block to be. Here's how. Move
  2810.     the mouse to the upper left character of what you want selected and
  2811.     Click. Choose Block Select from the Edit menu. Now click on the lower
  2812.     right character of the area you want selected. Your selection is
  2813.     completed.
  2814.  
  2815.          After you have selected an area, you may choose the operation that
  2816.     you want to perform on the selected area. For example, you may Cut or
  2817.     Copy the selected region to the Clipboard by using choices on the Edit
  2818.     menu or you may specify a text attribute such as Bold or Underline from
  2819.     the Graphic menu.
  2820.  
  2821.          If you decide not to perform an operation with the selected area,
  2822.     press the right mouse button to cancel the selection.
  2823.  
  2824.     Note: Block selection can only be done within a single page of your
  2825.     document.
  2826.  
  2827.  
  2828.  
  2829.  
  2830.  
  2831.  
  2832.                           Copyright (c) 1993 Piaf, Inc.
  2833.  
  2834.     Surefire S2.0 User's Guide                                       Page 49
  2835.  
  2836.        Line Selection
  2837.  
  2838.          To make a line selection, Move the mouse to the first character
  2839.     that you want selected and Click. This positions the page cursor to
  2840.     indicate the beginning of the selection. Now choose "Line Select" from
  2841.     the Edit menu. You may then define the extent of the selection by Dragging
  2842.     or Clicking.
  2843.  
  2844.          You may Drag the mouse to the right of the starting point or anywhere
  2845.     on any line below this point in your document. Make sure the mouse cursor
  2846.     is on the starting point, then press and hold the left mouse button. As
  2847.     you Drag, you will change the shape of the selected area as long as the
  2848.     mouse button remains pressed. Holding the mouse at the edges of the
  2849.     document will extend the selected region by scrolling the document. The
  2850.     selection will be complete once you Release the mouse button.
  2851.  
  2852.          If you can see the last character that you want to select, you may
  2853.     Click there directly instead of dragging. Thus, you may line select an
  2854.     area of your document simply by moving the mouse and Clicking on the
  2855.     first character, choosing "Line Select" from the Edit menu, and then
  2856.     Clicking again on the last character of the area.
  2857.  
  2858.          As with Block Selection, after you have selected an area, you may
  2859.     choose the operation that you want to perform on the selected area. For
  2860.     example, you may Cut or Copy the selected region to the Clipboard by
  2861.     using choices on the Edit menu or you may specify a text attribute such
  2862.     as Bold or Underline from the Graphic menu.
  2863.  
  2864.          You may cancel your selection by pressing the Right mouse button or
  2865.     using the (Esc) key.
  2866.  
  2867.     Note: Line selection may be done across as many pages as you wish.
  2868.  
  2869.  
  2870.     Viewing Clipboard Objects
  2871.  
  2872.          As you saw in the previous section, selected text and rectangular
  2873.     regions become Clipboard objects when you Cut or Copy them.  An easy way
  2874.     to understand exactly what happens when objects are Cut or Copied to
  2875.     Surefire's imaginary Clipboard is to think about a real clipboard.  Lets
  2876.     suppose that our real clipboard holds all of the pages of our document.
  2877.     On top of the pages, let's pretend that we've overlaid a clear plastic
  2878.     sheet--perhaps something made for an overhead projector.
  2879.  
  2880.          Now, imagine that you stuck several yellow notes from a "Post-it"
  2881.     pad all over the plastic sheet.  These particular yellow notes have
  2882.     clippings of text on them.  Remember that the "Post-it" notes are
  2883.     obviously not part of the document text.  You can see this clearly
  2884.     because the notes obstruct from view the text underneath them and are a
  2885.     different color.  In addition, they can easily be moved around by
  2886.     "sticking" and "unsticking" them, while the document text remains fixed
  2887.     to the page.
  2888.  
  2889.  
  2890.  
  2891.                           Copyright (c) 1993 Piaf, Inc.
  2892.  
  2893.     Surefire S2.0 User's Guide                                       Page 50
  2894.  
  2895.          Now in our real-world clipboard situation, what do you do if you
  2896.     want see a different page underneath the clear plastic sheet?  You
  2897.     simply remove the plastic sheet and shuffle the other document pages
  2898.     until you see the page you want.  Only after the page you want is in
  2899.     view, can you replace the clear plastic sheet to see the notes again.
  2900.     To do this, you simply put the plastic sheet back on top of the pile.
  2901.  
  2902.          As you've probably gathered, the behavior of the Surefire Clipboard
  2903.     is almost exactly the same as our real one.  The only difference between
  2904.     them is that Surefire's Clipboard is only the clear plastic sheet and
  2905.     notes.  In Surefire, the document memory is kept separate from the
  2906.     Clipboard memory, although they both can be displayed simultaneously on
  2907.     the screen.  Remember that Surefire's word processor uses three distinct
  2908.     memory spaces: the on-screen copy of the file (document), a delete
  2909.     buffer (for undeleting deleted text) and the Clipboard.  Each of these
  2910.     are independent of each other, and the only time they interact is when
  2911.     you deliberately ask them to do so by using some kind of interactive
  2912.     command.  As you continue to use Surefire, this distinction will become
  2913.     more and more obvious.
  2914.  
  2915.          When your Clipboard Objects are hidden, you can press (Shift+F6) to
  2916.     all of the objects at the same time. You may press (Shift+Tab) to move
  2917.     the cursor from one object to the other.  Move the object with the
  2918.     cursor around on the screen by pressing the arrow keys.  Press
  2919.     (Shift+Tab) again to move the cursor to another object.  Notice that the
  2920.     object with the cursor may appear brighter than the others.
  2921.  
  2922.          To hide one object while viewing the others, press (Tab).  This
  2923.     will cause the cursor to move between each of the other objects and
  2924.     gradually cause all but one of the objects to disappear.  To view and
  2925.     return the cursor to the first object, keep pressing (Tab).
  2926.  
  2927.          When you press (F6) to return the cursor to the document, all of
  2928.     the Clipboard objects will be hidden once more.
  2929.  
  2930.  
  2931.     Copying Text
  2932.  
  2933.          Perhaps the most frequently used Clipboard operation is Copy.
  2934.     Whenever you copy a piece of text to another location in Surefire, you
  2935.     put a replica of a piece of text on the Clipboard while leaving the
  2936.     original where it is in the document.  When you locate the new place you
  2937.     want the copied object to go, you either use Paste or Paste & Keep.
  2938.  
  2939.          The most commonly copied text items are long phrases or names that
  2940.     are often repeated.  For example, if you are writing a proposal to
  2941.     expand a sewage disposal plant, instead of typing "Albuquerque Municipal
  2942.     Water System and Sewage Treatment Facility" 26 times, just type it once,
  2943.     copy it to the Clipboard, and paste it 25 times!  Therefore, if you find
  2944.     yourself repeating any line of text more than a couple of times, rather
  2945.     than retype, just select the text using Line select and Copy it.  When
  2946.     you find the right spot to insert it, Paste it.
  2947.  
  2948.  
  2949.  
  2950.                           Copyright (c) 1993 Piaf, Inc.
  2951.  
  2952.     Surefire S2.0 User's Guide                                       Page 51
  2953.  
  2954.          In addition, since you can Copy a piece of text, you can compare
  2955.     how the block or line reads in its new location compared to the old
  2956.     location.  Exercise some caution with this, however. If you copy and
  2957.     relocate a larger block of text, it appears in the document in both
  2958.     places.  If the original block isn't removed later, it will still be in
  2959.     both places, and when reading over the manuscript you may not notice the
  2960.     repeated section if the instances are far enough apart.  However, if the
  2961.     person reading your document is skimming through it quickly, he may say
  2962.     to himself, "Didn't he just say that?".  Therefore, after you compare,
  2963.     make sure that you delete one of the copies so that you don't
  2964.     inadvertently repeat the same thing twice or more, in exactly the same
  2965.     way in different parts of your document.
  2966.  
  2967.  
  2968.     Moving Text
  2969.  
  2970.          While copying text is the most common Clipboard operation, moving
  2971.     text is the safest.  Because there is always one copy of a paragraph in
  2972.     the document, you avoid the "reproducing rabbit" syndrome sometimes
  2973.     found in documents where copying is excessive.  With move, you can
  2974.     always return your text to its original position if you don't like the
  2975.     new lineup.  So choose to move text if you're trying out material in a
  2976.     different order.  If it's gone from the first location, you can always
  2977.     get it back by moving it again.  And it won't embarrass you like rabbit
  2978.     fever can.
  2979.  
  2980.          The major function associated with moving is "parking".  When you
  2981.     are writing paragraphs you often remember something that you haven't
  2982.     discussed, or need to discuss in another place.  Instead of loosing your
  2983.     train of thought, you simply designate a place to "park" your tangents.
  2984.     It is also a good idea to "park" text that "just doesn't fit" in the
  2985.     sections you are currently writing.  If the misfit text is important and
  2986.     needs to be addressed, you'll find a more appropriate place for it
  2987.     later.  Instead of deleting it, just "park" it.
  2988.  
  2989.          Setting the last page of the document aside for stray text is a
  2990.     common approach to "parking".  This way you can have a safe place to
  2991.     store text without affecting anything else in the document--like page
  2992.     numbering.  And the page is saved along with the rest of your document.
  2993.     You can name this page "Asides" or "Afterthoughts" with a Bookmark to
  2994.     make it easy to locate with "Find".  This will help if your document
  2995.     keeps growing, and you don't want to keep track of the new page numbers.
  2996.  
  2997.          When you combine "parking text" with the "Book marking" technique
  2998.     discussed in the last chapter, you can easily move between the Asides
  2999.     and the paragraph you are currently working on.
  3000.  
  3001.          After you find a place for the "parked" text in the document, you
  3002.     can easily locate it and zip it out of its "parked" location and move it
  3003.     anywhere in the document using Cut or Copy and Paste.
  3004.  
  3005.          If you will be parking a lot of text, add a New Page, with a page
  3006.     stop before it, at the end of your document. To do this, go to the end
  3007.     of the document and choose "Add Page" from the Page menu. Move the
  3008.  
  3009.                           Copyright (c) 1993 Piaf, Inc.
  3010.  
  3011.     Surefire S2.0 User's Guide                                       Page 52
  3012.  
  3013.     cursor upward to the line below the bottom margin of the previous page
  3014.     that shows you where the page ends.  Press (Spacebar).  You will see a
  3015.     "STOP" displayed.  A page stop (or hard page break) prevents text which
  3016.     is added on previous pages, from being wrapped onto this one.
  3017.  
  3018.          Press (F6) to bring a previously Cut or Copied Clipboard object
  3019.     into view.  Position the object in between the margins by pressing the
  3020.     arrow keys.  Paste the object by pressing (ALT+F3).  The text has been
  3021.     successfully "parked".
  3022.  
  3023.          You move text by simply Cutting it to the Clipboard and then
  3024.     Pasting it from the Clipboard in the desired location.  Unlike, Copy,
  3025.     the selected text in the document is not retained, but is removed in the
  3026.     same fashion as if it were deleted.  Keep in mind that with Cut (as with
  3027.     Delete), the results of the Cut operation are different depending on
  3028.     whether you used Block select or Line select to select the text.
  3029.  
  3030.  
  3031.     Pasting Text
  3032.  
  3033.          Before pasting a Clipboard object, move the cursor to the location
  3034.     where the text will be inserted. The Paste operation will place the
  3035.     object in the document differently depending on how it was selected.
  3036.     Therefore if you are editing "wrapped" text, and used Block select, the
  3037.     results of pasting the Clipboard object will be the same as if you typed
  3038.     the text using Typeover mode. When you paste the Block, it retains its
  3039.     same shape.
  3040.  
  3041.          If you've selected text using Block select, it is important that
  3042.     there is enough blank space for the Clipboard object before you paste,
  3043.     or the operation will obliterate existing text (and Undelete will not
  3044.     undo this kind of deletion).  There are times when this is what you want
  3045.     to do, but as a rule, you probably will want to make sure that there
  3046.     is enough room first. Also, if the object is not contained between the
  3047.     margins, you will see a message when you try to paste. Block selected
  3048.     objects must be completely contained in the typing area.
  3049.  
  3050.          As long as you don't position the object in a margin and there is
  3051.     no conflict with any fields (see "Chapter 11: Introduction to Fields"),
  3052.     there will always be room for Line Selected text, memory allowing. If a
  3053.     piece of "wrapped" text was selected using Line select, it will be
  3054.     incorporated into the existing text when pasted as if you entered it
  3055.     using Insert mode.  If you are in Word Wrap mode, the text is "wrapped
  3056.     into" the document.  If Word Wrap is not on, text is inserted line by
  3057.     line and is not wrapped together.
  3058.  
  3059.          Choose "Paste" from the Edit menu or press (ALT+F3) to Paste a
  3060.     Clipboard object. After you Paste the object, the previously displayed
  3061.     one will be displayed because it is now "on top of the pile".  To hide
  3062.     it and return the cursor to the document, press (F6).
  3063.  
  3064.  
  3065.  
  3066.  
  3067.  
  3068.                           Copyright (c) 1993 Piaf, Inc.
  3069.  
  3070.     Surefire S2.0 User's Guide                                       Page 53
  3071.  
  3072.        Paste & Keep
  3073.  
  3074.          In contrast to Paste, Paste & Keep will retain a copy of the
  3075.     Clipboard object even after it is pasted, and functions as the
  3076.     "rubber-stamp" approach to "cut-and-paste" editing.  If you keep using
  3077.     a long phrase like , "Albuquerque Municipal Water Storage and Sewage
  3078.     Treatment Facility", just use Paste & Keep instead of Paste to retain a
  3079.     copy of the object on the Clipboard after every insert.
  3080.  
  3081.          Choose "Paste & Keep" from the Edit menu or press (ALT+F4) to Paste
  3082.     & Keep a Clipboard object.  Notice that there are now two copies of the
  3083.     text displayed on the screen.  One is now part of the document and one
  3084.     is a Clipboard object.  To return the cursor to the document, press (F6)
  3085.     to hide the Clipboard object.
  3086.  
  3087.  
  3088.     Sizing Clipboard Objects
  3089.  
  3090.          Whenever you Cut or Copy selected text to the Clipboard, the
  3091.     viewable portion of the object is set to be the first 12 lines of larger
  3092.     objects.  This gives you a context to know what the object contains
  3093.     without having the object occupy too much of the screen.  There are
  3094.     times when you will resize the object to view other than 12 lines.
  3095.  
  3096.          For example, let's suppose that you had several Clipboard objects
  3097.     each the size of a paragraph.  In this case, you are using the Clipboard
  3098.     as a means to help you create a mock "outline" so that you can
  3099.     experiment with different sequences of these paragraphs and determine
  3100.     the order that is the most effective.  When creating your "outline" it
  3101.     would be preferable to reduce the size of the object to just the one or
  3102.     two sentences.  Then you can rearrange the objects on the screen,
  3103.     determine the best order, and then paste them one-by-one into the
  3104.     document starting with the one you have decided will be first. Using the
  3105.     Clipboard in this manner turns out to be a very efficient way to
  3106.     reorganize the content of letters, reports and proposals.
  3107.  
  3108.          Another time you'll want to resize your object is when you have
  3109.     more text in an object than what is displayed.  For times like these,
  3110.     you can always make the object larger.  Keep in mind that when you
  3111.     resize a Clipboard object, what is stored in the object remains the
  3112.     same--only the viewable portion is changed.
  3113.  
  3114.          Once the Clipboard object is visible, follow these steps:
  3115.  
  3116.          1. Press (Shift+F3).
  3117.          This tells Surefire that you want to resize the object.  The cursor
  3118.          will move to the lower right-hand corner of the object.
  3119.  
  3120.          2.  Press (up arrow).
  3121.          The object will keep shrinking until it is one-line tall.
  3122.  
  3123.          3.  Press (down arrow).
  3124.          The object will expand to its original size.
  3125.  
  3126.  
  3127.                           Copyright (c) 1993 Piaf, Inc.
  3128.  
  3129.     Surefire S2.0 User's Guide                                       Page 54
  3130.  
  3131.          4.  Press (right arrow).
  3132.          Nothing happens.  This is because the object is already as wide as
  3133.          its original size.
  3134.  
  3135.          5.  Press (left arrow).
  3136.          The object shrinks in width.  Now press (right arrow) to expand the
  3137.          object.
  3138.  
  3139.          6.  Return the cursor to its normal Clipboard object behavior.
  3140.          Press (Shift+F1) to return the cursor to the upper left-hand
  3141.          portion of the object.  The object can be moved around on the
  3142.          screen again.
  3143.  
  3144.          7.  Press (F6) to return the cursor to the document.
  3145.  
  3146.          Often more information will be Cut or Copied to the Clipboard than
  3147.     what is initially viewed in the object.  Cases like whole pages are good
  3148.     examples.  In these cases, you may not want to resize the object, but
  3149.     instead may want to scroll it and view its contents in smaller
  3150.     portions.  You do this by pressing (Shift+F2).  This will put the cursor
  3151.     in the middle of the object, indicating that you want to scroll.  Now
  3152.     you can use the cursor keys to view all of the information in the
  3153.     object.  To be able to move the object again, press (Shift+F1).
  3154.  
  3155.  
  3156.     Removing Text
  3157.  
  3158.          In Surefire there are many ways to remove text.  Some you have
  3159.     already seen in the last chapter--"search and destroy" with "Find and
  3160.     Replace", pressing either the delete or backspace keys, delete to end of
  3161.     line or delete the whole line.  You can also remove text by changing
  3162.     your keyboard from Insert to Typeover mode and watching all previous
  3163.     characters vanish as you type over them.  In addition, you can select
  3164.     text, Cut it to the Clipboard and then not put it anywhere.  The last
  3165.     alternative is the topic of this section--you can select text and then
  3166.     delete it outright.
  3167.  
  3168.          Although potentially dangerous, select and delete is a useful
  3169.     function.  It is best used for times you have writing experiments that
  3170.     don't work, redundant sentences and rambling prose.  It helps you keep
  3171.     things concise and clean up a cluttered manuscript.
  3172.  
  3173.          In Surefire, deleting text is simple:  just select text using Block
  3174.     select or Line select and choose Delete from the Edit menu.  Keep in
  3175.     mind that with Delete (as with Cut), the selection method you use gives
  3176.     you different results when you remove text.  Deleting Block selected
  3177.     text will leave white space behind just as if you typed in lines of
  3178.     spacebar characters in Typeover mode.  In contrast, deleting Line
  3179.     selected text results in having the text below the deletion "wrap up" to
  3180.     fill in the hole.
  3181.  
  3182.  
  3183.  
  3184.  
  3185.  
  3186.                           Copyright (c) 1993 Piaf, Inc.
  3187.  
  3188.     Surefire S2.0 User's Guide                                       Page 55
  3189.  
  3190.     Recovering Text
  3191.  
  3192.          With all of these convenient ways to eliminate text from you
  3193.     document, it's important to know all the ways you can get it back if you
  3194.     delete too much or you simply change your mind. As you know, being able
  3195.     to delete a block can be a potentially disastrous capability.  You can
  3196.     accidentally or thoughtlessly press the wrong keys.  Or you could change
  3197.     your mind after deleting a lot of text, what do you do then?
  3198.  
  3199.          If the delete was the last one you did then you're alright.  Simply
  3200.     press Undelete (F5).  This will recall the piece from the "delete
  3201.     buffer" and return it to your document in the same place it was before.
  3202.     But if you delete the important text awhile ago, and have since deleted
  3203.     other things, then you can't resort to Undelete.  If the lost text was
  3204.     part of your original document, you're still alright.  You could just
  3205.     reopen your original version.  But, if you made a lot of beneficial
  3206.     changes since disaster struck, you will be loosing those as well as
  3207.     recovering the deleted text.  This could mean you'd be sacrificing a lot
  3208.     more than you'd gain.
  3209.  
  3210.          Another alternative is to save the on-screen document to a
  3211.     different file so that your beneficial changes are preserved. Now reopen
  3212.     the original document and recover the lost piece.  Once you have the
  3213.     original document on your screen, select the piece, copy it to the
  3214.     Clipboard and hide the Clipboard by pressing (F6).  Recall the version
  3215.     you were working on (and have since saved as a different file).  Show
  3216.     the Clipboard again by pressing (F6) and paste the lost material.
  3217.  
  3218.     Using the Mouse to Hide/Unhide an Object
  3219.  
  3220.          To Hide a visible clipboard object using the mouse, Click anywhere
  3221.     on the text "F6-Hide" on the Hint Line. If the Hint Line is not displayed,
  3222.     press (Shift+F10) to display it first or just press (F6). To Unhide or
  3223.     view the clipboard objects, Click on the text "F6-Clip" on the Hint Line.
  3224.  
  3225.     Switching Among Clipboard Objects with the Mouse
  3226.  
  3227.          If no clipboard objects are visible, you may make them visible by
  3228.     unhiding them. When more than one clipboard object is visible, the one
  3229.     that is highlighted is the current object. To make a different object the
  3230.     current object, you simply Click on it. You may also Click on "Tab" or
  3231.     "Shift+Tab" on the Hint Line to move among them. (Shift+Tab) will hide
  3232.     the current clipboard object and make the next clipboard object visible
  3233.     and current.
  3234.  
  3235.     Moving a Clipboard Object with the Mouse
  3236.  
  3237.          You may move a visible clipboard object around the screen easily
  3238.     with the mouse. Move the mouse cursor to the upper left corner of the
  3239.     clipboard object. Now, Drag  the object to the desired position in the
  3240.     Document.  If the destination you want is not visible, you must first
  3241.     Hide the object, scroll or page to the desired portion of the document,
  3242.     Unhide the object and then move it around. When the object is in the
  3243.     desired position, choose Paste or Paste & Keep from the Edit menu.
  3244.  
  3245.                           Copyright (c) 1993 Piaf, Inc.
  3246.  
  3247.     Surefire S2.0 User's Guide                                       Page 56
  3248.  
  3249.     Chapter 8      -    ADDING EMPHASIS
  3250.  
  3251.          All documents have a purpose.  Business documents are written to
  3252.     inform, influence, persuade or convince the reader to do something or
  3253.     think something.  You might write a letter to persuade a person to buy
  3254.     your product or support your organization.  Or you might write a report
  3255.     to inform your investors that you are increasing your market share.
  3256.     Whatever the purpose, documents that are effective in accomplishing
  3257.     these goals are always clearly written and easy to understand.
  3258.  
  3259.          The easiest way to use Surefire to improve the effectiveness of a
  3260.     document is to take advantage of its graphical capabilities.  By using
  3261.     its graphical features you can add emphasis to text and organize your
  3262.     thoughts to make your point more clear and convincing.  You can support
  3263.     your conclusions with tables and graphs that effectively illustrate your
  3264.     data.  When used effectively, these elements help to guide your readers
  3265.     through your printed thoughts, making it easier for them to agree with
  3266.     your position, give you the job or buy your product.
  3267.  
  3268.          This chapter explains how to use Surefire's graphical features.
  3269.     Specifically you are going to learn how to emphasize text, use special
  3270.     characters, indent paragraphs, draw boxes and lines, and construct
  3271.     tables and graphs.
  3272.  
  3273.  
  3274.     Character Attributes
  3275.  
  3276.          There are two methods Surefire offers for adding emphasis to text:
  3277.     drawing boxes around paragraphs to make them stand out, or having the
  3278.     characters themselves stand out by either capitalizing them or giving
  3279.     them attributes.
  3280.  
  3281.          Attributes are the distinctive elements added to selected
  3282.     characters to make them look different than the rest.  In Surefire, you
  3283.     can make text bold, underlined or both.
  3284.  
  3285.          Make words bold when you want to emphasize them inside a paragraph.
  3286.  
  3287.     These are words that you don't want the reader to miss.  Defined terms
  3288.     are good candidates for boldfacing.  Underlined words are also commonly
  3289.     found inside paragraphs.  In contrast to bold words, these words are
  3290.     "loud" and are used to remove any doubt from the reader's mind that this
  3291.     is important.  A good example is: "this does not mean that we are going
  3292.     to support the project."
  3293.  
  3294.          Making a word both underlined and bold is usually too loud for
  3295.     words inside a paragraph but is excellent for emphasizing headlines and
  3296.     subheadings.  In order to make the best use of emphasis in headings and
  3297.     subheadings, you should develop a consistent system for assigning
  3298.     attributes to them.  Both headlines and subheadings should be clear and
  3299.     readable.  If your document lends itself to subheadings, use them to
  3300.     your advantage.
  3301.  
  3302.  
  3303.  
  3304.                           Copyright (c) 1993 Piaf, Inc.
  3305.  
  3306.     Surefire S2.0 User's Guide                                       Page 57
  3307.  
  3308.        Giving a Character Attribute to Text
  3309.  
  3310.          To give a character attribute, select the text first using either
  3311.     Block or Line Selection. When the desired text is highlighted, you can
  3312.     apply Bold, Underline or both Bold and Underline attributes to your
  3313.     text. Bring up the Graphic menu by pressing (ALT+G).  Move the cursor to
  3314.     one of the attribute types such as "Bold & Underline" and press (Enter).
  3315.  
  3316.          If you have a monochrome monitor, notice that the text is displayed
  3317.     as it would be printed.  On a color monitor, notice that the text
  3318.     becomes blue while the background becomes green. If you had chosen
  3319.     "Underline", on a color monitor, notice that the background of the text
  3320.     is green.
  3321.  
  3322.          If you change your mind about making text bold or underlined, you
  3323.     can return it to its natural state by first selecting it and then
  3324.     choosing "Normal" from the Graphic menu.
  3325.  
  3326.  
  3327.     Special Characters
  3328.  
  3329.          For the times when you are using foreign words, mathematical
  3330.     symbols, fun symbols or special graphical elements such as characters to
  3331.     join lines and boxes, you will be using special characters.  These
  3332.     characters are available from the Special Characters window from the
  3333.     Graphic menu.  They are grouped by type and you choose them by
  3334.     positioning the cursor over one of them and pressing (Enter).  Once a
  3335.     character has been chosen, you can access it without bringing up the
  3336.     menu by pressing (Ctrl+S).  This inserts the previously selected special
  3337.     character into your text in the same manner as if you just selected it
  3338.     from the window.  The Special Character window is shown below.
  3339.  
  3340.          Surefire is intended to be used for English documents and foreign
  3341.     characters are available when you need to add a foreign word to an
  3342.     English document.
  3343.  
  3344.     Indenting Lines and Paragraphs
  3345.  
  3346.          Another way to set off text visually on the page is by indenting
  3347.     it.  It makes it interesting and gives the reader an idea about the
  3348.     relative importance of the text he is reading.
  3349.  
  3350.          The first lines of paragraphs are the most commonly indented text.
  3351.     To do this, you simply type (Tab) before entering text for a paragraph.
  3352.     If you have already entered the text for a paragraph and find later that
  3353.     you want to indent the first line, move the cursor to the beginning of
  3354.     the line and insert a (Tab).  With Word Wrap on, the rest of the
  3355.     paragraph will adapt to the adjustment by reflowing.  Otherwise, it will
  3356.     shift if there is enough space on the line to accommodate the inserted
  3357.     characters.
  3358.  
  3359.          If you find that you want to indent a whole paragraph, simply add
  3360.     tabs to the beginnings of all of the lines.  If you have already entered
  3361.     the text, you can also indent the paragraph.  In this case, it is
  3362.  
  3363.                           Copyright (c) 1993 Piaf, Inc.
  3364.  
  3365.     Surefire S2.0 User's Guide                                       Page 58
  3366.  
  3367.     important to start at the top of the paragraph and then work your way
  3368.     down the left-hand margin, indenting all of the lines one-by-one.
  3369.     Otherwise, the paragraph may not flow correctly.
  3370.  
  3371.          The standard or default size for a tab is five characters.  If you
  3372.     wanted to change this to a different size, you'd need to change the tab
  3373.     size in the Setup window.  To do this, bring up the Setup window from
  3374.     the File menu by pressing (ALT+F), (E).  The Setup window will appear.
  3375.     Use the (End) key to move the cursor to the "Tab Size:" text entry field
  3376.     and type in the new value.  When you are done, press (Ctrl+Enter) to
  3377.     close the window and change the tab size of the tabs you will type in
  3378.     the future.  Keep in mind that this will not change previously typed tab
  3379.     sizes.  If you want the new tab size to become the default, then instead
  3380.     of pressing (Ctrl+Enter), move the cursor to the "SAVE" action button
  3381.     and press (Enter) to close the window and change the tab size.
  3382.  
  3383.  
  3384.     Drawing Boxes and Lines
  3385.  
  3386.          Drawing Boxes and Lines to emphasize text is easy to do in
  3387.     Surefire.  Horizontal lines are drawn from left-to-right.  You simply
  3388.     position the cursor at where you want the line to start on the left,
  3389.     choose a style of line in the Graphic menu and then move the cursor to
  3390.     the right until the line is the desired length.  Now, press (Enter).
  3391.     When you draw a vertical line, you do the same except in this case, you
  3392.     move the cursor from top to bottom and press (Enter).
  3393.  
  3394.          When you draw a box, you also draw it from left-to-right and
  3395.     top-to-bottom.  You start in the upper left-hand corner of the box,
  3396.     choose a line style, move the cursor to the lower right-hand corner and
  3397.     press (Enter).  Notice that the mechanics of this is very similar to
  3398.     Block selecting text.
  3399.  
  3400.          Keep in mind that lines and boxes, always replace whatever was
  3401.     underneath them.  Therefore, if you are using a line or a box, it is
  3402.     important to allow one character blank space for the lines to be drawn.
  3403.  
  3404.          In addition to using lines and boxes to set paragraphs off in
  3405.     documents, you can do many kinds of business graphics: charts, graphs
  3406.     and diagrams.
  3407.  
  3408.        Using a Mouse
  3409.  
  3410.          Drawing lines and boxes with the mouse is very easy and is similar to
  3411.     Block Selection described earlier. To draw a line or box in the document,
  3412.     you must be Editing the Document or be in Text mode.
  3413.  
  3414.          Move the mouse to the left side or upper left corner of the desired
  3415.     line or box and Click. Now choose one of the 3 line styles from the Graphic
  3416.     menu. You may then define the extent of your line or box by Dragging or
  3417.     Clicking.
  3418.  
  3419.  
  3420.  
  3421.  
  3422.                           Copyright (c) 1993 Piaf, Inc.
  3423.  
  3424.     Surefire S2.0 User's Guide                                       Page 59
  3425.  
  3426.     Constructing Tables
  3427.  
  3428.          A table is two or more columns of text and numbers and is used for
  3429.     referencing information quickly.  Whenever you want to arrange two or
  3430.     more columns of information side-by-side, you use a table.
  3431.  
  3432.          For example, you may want to set up columns of data that list your
  3433.     monthly sales so you can determine your commission at the end of the
  3434.     quarter and report it to your employer.  These figures will be easy to
  3435.     read and manipulate if you present them in a table.  In addition, your
  3436.     tables are more readable if you use the techniques you learned in the
  3437.     last section to add lines and boxes to them.
  3438.  
  3439.         Tables are best entered and edited using Typeover mode.  Word Wrap
  3440.     should be off so that is doesn't create a lot of formatting problems.
  3441.  
  3442.          The easiest way to enter a table is to use the (Tab) key to align
  3443.     the columns.  For example, you could have a 20 character first column
  3444.     for names, a 10 character second column for salaries, and a 5 character
  3445.     third column for hiring dates.  Since each of these column widths line
  3446.     up with the default tab stops (5 spaces per tab), then it is a simple
  3447.     matter to hit one or two tabs after each entry to position the cursor at
  3448.     the next column.
  3449.  
  3450.          To line up your columns nicely, choose your columns so that they
  3451.     are all multiples of some number (5 in the above example).  Then, set
  3452.     your tab size to that number.  To change the tab size, you simply enter
  3453.     the new size in the "Tab size:" text entry field in the Setup window.
  3454.     Now you can use tabs to align your columns.  Use the column indicator on
  3455.     the status line to figure out exact cursor positions, as shown below.
  3456.  
  3457.          Remember that changing the tab width only affects the width of the
  3458.     tabs that you are going to type in the future.  Therefore, if you have
  3459.     already entered a table earlier in the document using a different tab
  3460.     size, it will be unaffected by your change.
  3461.  
  3462.          After you have entered your text into the table, and are satisfied
  3463.     with the widths of the columns, you can add lines and boxes to make the
  3464.     tables easier and more interesting to read.  See "Drawing Boxes and
  3465.     Lines" for more information.
  3466.  
  3467.  
  3468.  
  3469.     Text Alignment
  3470.  
  3471.          Surefire gives you the ability to change the alignment of selected
  3472.     text. You may left or right justify the text, center it, or align it to
  3473.     both the left and right margins. As with other operations during word
  3474.     processing in Surefire, any single line fields that are within the
  3475.     selected text move as you would expect.
  3476.  
  3477.  
  3478.  
  3479.  
  3480.  
  3481.                           Copyright (c) 1993 Piaf, Inc.
  3482.  
  3483.     Surefire S2.0 User's Guide                                       Page 60
  3484.  
  3485.          You must be editing the document or in text mode to align text.
  3486.     Select the text you wish to align using "Line Select" (from the Edit
  3487.     menu). After the text is selected, choose "Align" from the Edit menu or
  3488.     press (CTRL+A). The Align Text window will be displayed. Here you can
  3489.     choose Left, Right, Center, or Align LR.
  3490.  
  3491.          The text alignment operation is not affected by Wrap mode. So, if
  3492.     any space is made at the end of a line, the text below will not wrap up
  3493.     even if Wrap is On.
  3494.  
  3495.     Note:   This feature works best if you select complete lines or paragraphs.
  3496.  
  3497.        Left Justification
  3498.  
  3499.          Left justification moves each line of text up against the left
  3500.     margin. It also removes any extra blanks found between words. So if your
  3501.     text was previously Aligned Left/Right, left justification will remove
  3502.     the spaces that were inserted. After you perform left justification, you
  3503.     may want the paragraph to be wrapped up. To "force wrap" a paragraph,
  3504.     make sure that Wrap is on, put the page cursor one space after the last
  3505.     word of the first line, and press the (Delete) key. See Chapter 4 "Typing
  3506.     Text" for more information about wrapping text.
  3507.  
  3508.        Right Justification
  3509.  
  3510.          When you choose right justification, each line of the selected text
  3511.     will be moved up against the right margin. Any extra blanks found between
  3512.     words are also removed.
  3513.  
  3514.        Centering Text
  3515.  
  3516.          Centering makes formatting headlines and titles very easy. Unlike
  3517.     left and right justification, center does not remove any extra blanks
  3518.     between words.
  3519.  
  3520.        Left/Right Text Alignment
  3521.  
  3522.          Left/Right text alignment formats text so that words are moved right
  3523.     up to both the right and left margins. This is done by inserting extra
  3524.     spaces between words for each line of selected text. If you want to have
  3525.     as many words on a line that can fit, make sure that you force wrap your
  3526.     text first. Read Chapter 4 for details on wrapping paragraphs
  3527.  
  3528.     Note: For right justified and left/right aligned text, you may want to
  3529.     reformat your text back to left justified prior to additional editing.
  3530.     This way, with Wrap on, the maximum number of words on each line are
  3531.     maintained automatically. Then when you finish editing your document, you
  3532.     can just reformat the text back to right justified or left/right aligned
  3533.     before saving or printing.
  3534.  
  3535.  
  3536.  
  3537.  
  3538.  
  3539.  
  3540.                           Copyright (c) 1993 Piaf, Inc.
  3541.  
  3542.     Surefire S2.0 User's Guide                                       Page 61
  3543.  
  3544.     Chapter 9      -    PAGE LAYOUT
  3545.  
  3546.          In business, presentation matters.  Present something well, and its
  3547.     merits become more visible than its flaws.  Present something badly, and
  3548.     its weaknesses show up more clearly than its strengths.  In writing, the
  3549.     word for presentation is "layout".  It simply means the physical design
  3550.     and appearance of your document.
  3551.  
  3552.          There are no strict laws governing the layouts for pieces of
  3553.     writing, although there are many standards.  The documents you are
  3554.     likely to write in Surefire fall into many different categories:  sales
  3555.     reports, business letters, notices to employees, reports of meetings,
  3556.     product announcements and so forth.  Each of these categories has been
  3557.     around for a long time and has its own requirements for content and
  3558.     layout.  For example, when reading a memo describing a change in policy,
  3559.     most people expect to see how the new policy will affect their jobs.
  3560.     Whereas, when reading a report of a meeting, most people expect to hear
  3561.     who said what and how the final vote went.  And, with this expected
  3562.     content comes an expected layout.
  3563.  
  3564.          Therefore, when you start designing the layout for your documents,
  3565.     look at other documents from the same category.  When you uncover the
  3566.     most effective layout for the piece you're writing and it is the most
  3567.     appropriate for the reader you have in mind--simply duplicate the
  3568.     layout.  Of course, you may want to make some minor changes to suit your
  3569.     own unique purpose and audience.  Go right ahead.  When you've finished,
  3570.     if your own piece of writing looks well presented to you, it will also
  3571.     look well presented to your audience.
  3572.  
  3573.          In this chapter you will learn some of the many methods Surefire
  3574.     affords for customizing the layout to suit the needs of your document.
  3575.     Specifically, you will learn how to use Surefire's formatting commands
  3576.     to control how your document is printed; and then how to take advantage
  3577.     of the Clipboard to design a more sophisticated layout using desk-top
  3578.     publishing techniques.
  3579.  
  3580.          There's always something that you can do to make your manuscript
  3581.     visually more appealing and effective than you thought of when you were
  3582.     concentrating on getting the ideas straight, rather than how they'd look
  3583.     when printed.  We hope that you will be able to use the information in
  3584.     this chapter to produce pages that are attractive and delight the eye.
  3585.     Pages that are inviting and easy to read.
  3586.  
  3587.  
  3588.     Formatting Choices
  3589.  
  3590.          Whenever you set formatting options, you tell Surefire how you want
  3591.     the printed page to look.  Surefire gives you many formatting options to
  3592.     choose from so that you have the most readable setting for your printer
  3593.     and the most effective layout for your document.
  3594.  
  3595.          When choosing formatting options, you select the size of paper you
  3596.     want to use, and how wide the margins should be.  You specify where you
  3597.     want the printer to start printing, and what size characters to use.
  3598.  
  3599.                           Copyright (c) 1993 Piaf, Inc.
  3600.  
  3601.     Surefire S2.0 User's Guide                                       Page 62
  3602.  
  3603.     You also tell Surefire whether or not you want text printed in the
  3604.     margins such as page numbers, titles and dates.  You can also add pages
  3605.     or remove them and adjust your text accordingly.
  3606.  
  3607.          Because all of the formatting alternatives add up to a manuscript's
  3608.     total appearance, it's vital that a change made to one aspect of
  3609.     formatting of the document will add and not interfere with the
  3610.     effectiveness of another aspect.  For example, if you had wide margins,
  3611.     and tiny text, you could fit a lot of information on the page, but it
  3612.     would be difficult to read without eye-strain.  Therefore, the two main
  3613.     concerns when choosing a format for your document is that it is
  3614.     consistent and appropriate to the content.
  3615.  
  3616.          The final thing to think about when choosing a format is whether or
  3617.     not your printer can print your ideas.  Many of the formatting choices
  3618.     you'll be making will depend on the limitations of your printer.
  3619.     Obviously, you can print a more finished-looking documents with a laser
  3620.     printer or a letter-quality printer than you can with a 9-pin dot
  3621.     matrix.  For the lower-resolution printers your goal might be just
  3622.     making your document readable, while on the higher-resolution printers
  3623.     you might be changing the appearance of a document meant for
  3624.     publication.
  3625.  
  3626.  
  3627.     Changing Character Spacing
  3628.  
  3629.          As you know, text consists of the characters that you enter into
  3630.     Surefire.  Characters include letters, symbols, numbers and spaces.
  3631.     Standard characters are available by typing on the keyboard, and special
  3632.     characters are selected from the Special Character window (see "Chapter
  3633.     8: Adding Emphasis").  In addition, you can alter the horizontal spacing
  3634.     of the characters in the Format window.  And as you saw in the last
  3635.     chapter, you can change their attributes (bold or underlined) in the
  3636.     Graphic menu.
  3637.  
  3638.          Although you can have isolated areas of boldface or underlined
  3639.     text, when you change the size of characters in Surefire, you do so for
  3640.     the whole document.  Therefore, all of the characters in a document will
  3641.     be the same height and distance apart.  The term for character spacing
  3642.     is called font and it is represented by pitch.
  3643.  
  3644.          Pitch is the horizontal spacing of the characters on a line and is
  3645.     expressed in "characters-per-inch".  Since Surefire only uses fixed
  3646.     fonts (as opposed to proportional fonts), the pitch of a font determines
  3647.     how close together characters are on the line, but not how far apart the
  3648.     lines are in the vertical direction.  Therefore, on some printers, the
  3649.     characters themselves will shrink when they are printed closer together;
  3650.     but for many printers, as you fit more characters on the line, the
  3651.     characters will stay the same height and will be printed smashed
  3652.     together as opposed to reduced in size.  The printers that have variable
  3653.     character height are daisy-wheel, letter quality dot matrix and laser
  3654.     printers.
  3655.  
  3656.  
  3657.  
  3658.                           Copyright (c) 1993 Piaf, Inc.
  3659.  
  3660.     Surefire S2.0 User's Guide                                       Page 63
  3661.  
  3662.          The number of fonts Surefire lets you choose from varies from
  3663.     printer to printer.  For some printers, Surefire lets you choose between
  3664.     elite (12-pitch), pica (10-pitch) and small print (16.66-pitch).  You
  3665.     will notice how selecting a different font will change the readability
  3666.     of your text and makes more or less text fit on the page.  You should
  3667.     have Surefire set to Insert mode with Word Wrap on.
  3668.  
  3669.          To set a different font, bring up the Format window by pressing
  3670.     (ALT+P) (O). Move the cursor to the "Print Font:" multiple choice
  3671.     button. Use the (End) key until the cursor lands on the default font you
  3672.     have selected for your printer.  Press (ALT+Z) to view the list of fonts
  3673.     you have available for your printer. A font is a typestyle, and
  3674.     depending on your printer it can be represented in "pitch",
  3675.     "characters-per-inch", or some name unique to your printer.  To view all
  3676.     of the fonts in the list, move the cursor by pressing the (up arrow) and
  3677.     (down arrow) keys.
  3678.  
  3679.          Select one of the fonts in the list by pressing (Enter).  Close the
  3680.     Format window by pressing (Ctrl+Enter). Because the new font is either
  3681.     wider or narrower than the one you had before, Surefire will "rewrap"
  3682.     the "wrapped" pages to adjust for the new font.  Notice how the amount
  3683.     of text that fits on the page changes for pages where the text is in
  3684.     paragraphs. If the font is very small, all the text may fit on fewer
  3685.     pages and extra pages will be removed.
  3686.  
  3687.          Now, you can print with the new font. If you have a daisy-wheel
  3688.     printer, put in the pinwheel corresponding to the font selected.  This
  3689.     is usually very simple, and your printer manual has instructions. Bring
  3690.     up the Print window by pressing (Alt+F) (P).  Press (Ctrl+Enter) to
  3691.     choose PRINT.  If you need more information on using the Print window,
  3692.     or your document doesn't print, see "Chapter 23: More About Printing".
  3693.  
  3694.          You may notice that choosing a smaller font (larger pitch) will
  3695.     make more characters fit on a line.  Recall that the smaller font was
  3696.     displayed with exactly the same number of characters per line that will
  3697.     be printed.  In addition, the margins are kept the same width for
  3698.     printing.  The margins appear larger on the screen because more
  3699.     characters are needed to occupy the same space.  For example, if the
  3700.     left margin was 1" and you are using a pica (10-pitch) font, you will
  3701.     see the margin represented as 10 characters.  In contrast, choosing a
  3702.     larger font (smaller pitch) will result in fewer characters fitting on
  3703.     a line, and the margins will shrink accordingly.  Keep in mind that this
  3704.     is done because Surefire does not display the change in the size and
  3705.     spacing between characters on the screen (characters are fixed width).
  3706.     Therefore, the margins are displayed as growing or shrinking to
  3707.     accommodate more or less characters fitting on a line.
  3708.  
  3709.          Remember that the margins will not be wider or narrower when
  3710.     printed, but are only displayed that way on the screen to display the
  3711.     new font.  The number of characters occupying the page width, length and
  3712.     margins is always the same as it is printed.
  3713.  
  3714.  
  3715.  
  3716.  
  3717.                           Copyright (c) 1993 Piaf, Inc.
  3718.  
  3719.     Surefire S2.0 User's Guide                                       Page 64
  3720.  
  3721.          In addition, you will get different results depending on whether
  3722.     you have Word Wrap on or not.  Suppose you select a larger font (smaller
  3723.     pitch) than the one you used to type the document and Word Wrap is off.
  3724.     When you reformat with the new font, and your document has some text
  3725.     that no longer fits on a line, Surefire will automatically add another
  3726.     line just below the original line to put the extra text.  This will
  3727.     result in very interesting-looking tables and paragraphs!
  3728.  
  3729.          You can return the document to the default font using the Format
  3730.     window.  Move the cursor to the "RESET" action button and press (Enter).
  3731.  
  3732.     This will reset the Format window to the default settings.  Close the
  3733.     window by pressing (Ctrl+Enter) and watch the text "rewrap".
  3734.  
  3735.     Changing Printers
  3736.  
  3737.          Many people use two printers:  one for proofreading and one for
  3738.     final copies.  For example, the final copy of a document may be printed
  3739.     on a letter-quality or laser printer, but all of the rough drafts where
  3740.     printed on a 9-pin dot matrix printer.
  3741.  
  3742.          Usually switching between printers is not a problem--all you have
  3743.     to do is select another printer in the Setup window.  However, when the
  3744.     printer you are switching to supports different fonts than the first
  3745.     printer you used, you will have to choose a font that is supported by
  3746.     the second printer before it will print.  To illustrate, let's say that
  3747.     you previously printed a document on a HP Laserjet using an small print
  3748.     font (16.66 cpi).  Later, you revise the document and want to print out
  3749.     the new copy on a EPSONLQ.
  3750.  
  3751.          After switching printers in the Setup window, you'd soon discover
  3752.     that in this case, the document will not print on the EPSONLQ.  This is
  3753.     because a 16.66 cpi font is not supported by the EPSONLQ.  To be able to
  3754.     print on the EPSONLQ, you will need to change the font setting to one
  3755.     the EPSONLQ will print and reformat the document by selecting a font in
  3756.     the Format window.  Incidentally, if the EPSONLQ did support the 16.66
  3757.     cpi font, Surefire would have automatically choose that font for you
  3758.     when you changed printers.
  3759.  
  3760.          To continue the story, let's suppose that now you want to see what
  3761.     the document looks like when you use the smaller font supported by the
  3762.     HP.  You can reformat the document by typing in "16.66" in the "Not
  3763.     Supported:" text entry field while the EPSONLQ is still the selected
  3764.     printer.  When you are ready to print on the HP, you can simply change
  3765.     printers in the Setup window and 16.66 will again become a supported
  3766.     font.
  3767.  
  3768.  
  3769.  
  3770.  
  3771.  
  3772.  
  3773.  
  3774.  
  3775.  
  3776.                           Copyright (c) 1993 Piaf, Inc.
  3777.  
  3778.     Surefire S2.0 User's Guide                                       Page 65
  3779.  
  3780.     Rewrapping Paragraphs
  3781.  
  3782.          When you changed fonts, you will notice that only the paragraphs
  3783.     were "rewrapped" when you reformatted the document.  This is because
  3784.     only the groups of text Surefire considers to be paragraphs will be
  3785.     "rewrapped" in Word Wrap mode.  Therefore, when you have a "mixed"
  3786.     document which has tables, charts and diagrams and "wrapped" paragraphs,
  3787.     only the paragraphs will be "rewrapped" when you reformat.
  3788.  
  3789.          In contrast, if you reformat with Word Wrap off to a smaller font,
  3790.     space will be added between the right-hand margin and the end of the
  3791.     text for each line, so your lines will not reach the margin anymore.
  3792.     Reformatting with a larger font will cause extra lines to be added to
  3793.     accommodate the new text.
  3794.  
  3795.     What is a Paragraph?
  3796.  
  3797.          To predict whether or not a group of lines will be "rewrapped" when
  3798.     you reformat with Word Wrap on, you will need to decide whether or not
  3799.     the consecutive lines are a paragraph.  In Surefire, two conditions must
  3800.     be met before a group of lines is considered to be a paragraph:
  3801.  
  3802.          1. The lines are separated from the text above them by either one
  3803.          or more blank lines, or the first line of the group is indented.
  3804.  
  3805.          2. All lines after the first line must start at the first character
  3806.          position (next to the left-hand margin).
  3807.  
  3808.          Whenever you have a group of lines with one or more blank
  3809.     characters between the text and the left-hand margin, or more than 18
  3810.     characters between the end of the text and the right-hand margin, you do
  3811.     not have a paragraph.
  3812.  
  3813.          If you have tables and charts in your document, you will want to
  3814.     indent them at least one character from the left-hand margin to protect
  3815.     them from being wrapped.
  3816.  
  3817.          As you saw in earlier chapters, you can join lines by moving the
  3818.     cursor to the end of the first line and pressing Delete (Del).  If the
  3819.     next line is not indented, and Word Wrap is on, you can "force wrap" the
  3820.     group of lines into a wrapped paragraph.  Here, the second line will
  3821.     "wrap up" to join the first and all remaining lines will "wrap" until
  3822.     Surefire encounters either a blank or indented line.
  3823.  
  3824.     Changing Margins
  3825.  
  3826.          Like changing the font, changing margins can improve the look of
  3827.     your document if used with care.
  3828.  
  3829.          There are a number of reasons why you may decide to change the
  3830.     margins of your document.  In the editing or rewriting sections, text
  3831.     may have been added or deleted.  The difference in length may cause you
  3832.     to want the appearance on paper to change.  Your draft may be on plain
  3833.     paper, and you want your finished copy on letterhead.
  3834.  
  3835.                           Copyright (c) 1993 Piaf, Inc.
  3836.  
  3837.     Surefire S2.0 User's Guide                                       Page 66
  3838.  
  3839.          You may have a letter where all the text fits on the first page
  3840.     except for the signature and you want  to get the signature to "wrap
  3841.     up".  Or, you could have a table that is split between the first and
  3842.     second pages of a 2-page document, and you want to put the whole table
  3843.     on the next page.
  3844.  
  3845.          The "safest" margins to change are the top and bottom.  When you
  3846.     change the left and right margins with Word Wrap on, Surefire
  3847.     automatically rearranges the text to fit.  Once again, only paragraphs
  3848.     will rewrap to fit between the margins.  Therefore, if you have a
  3849.     document with indented text or wide tables and charts, these items may
  3850.     get "clipped" when the margins are made wider (space between the margins
  3851.     gets smaller).
  3852.  
  3853.          To change margins, simply bring up the Format window by pressing
  3854.     (Alt+P) (O).  Press (End) or (Home) to move the cursor to the margin
  3855.     setting area.  Type in the new dimensions in the "Margins" data entry
  3856.     fields: "Left:", "Right:", "Top:", and "Bottom:".  Press (Ctrl+Enter) to
  3857.     close the window and accept the new margins.
  3858.  
  3859.          If you don't like the results and you want to return to the default
  3860.     settings, simply open the Format window again by pressing (Alt+P) (O)
  3861.     and the press (End) to move the cursor to the "RESET" action button.
  3862.     Press (Enter).
  3863.  
  3864.          Keep in mind that like changing fonts, changing margins will affect
  3865.     all of the pages in the document.  If you don't want the new margins for
  3866.     all of the pages, you will need to find a different solution if you want
  3867.     to change margins to correct a formatting problem such as inserting
  3868.     spaces to find homes for "orphans" and "widows", breaking a long table
  3869.     into two tables or rearranging text via the Clipboard (see "Chapter 7:
  3870.     Clipboard Editing").
  3871.  
  3872.     Page Breaks
  3873.  
  3874.          As you know, when entering text, new pages are automatically added
  3875.     as you need them.  Likewise, as you remove text, pages are automatically
  3876.     removed as the text in your document contracts.  In addition, text
  3877.     entered with Word Wrap on, automatically flows across the page breaks.
  3878.  
  3879.          However, there are times when you'll want more control over what
  3880.     ends up on each page than just letting Surefire automatically handle it.
  3881.     There are times when you want to begin a section on a new page, and you
  3882.     want all the text from that point on to be independent from the text
  3883.     before.  Or, you may want to add a graph to the end of the document and
  3884.     want to make sure that no text wraps onto it.  In addition, you may want
  3885.     to "lock down" tables embedded in "wrapped" text to prevent them from
  3886.     shifting too far as lines are added and deleted above them.  In these
  3887.     cases, you can have more control over page boundaries by using "stop".
  3888.          For example, you may have some "wrapped" text, and then a table
  3889.     followed by more "wrapped" text.  As the "wrapped" text before the table
  3890.     grows and shrinks, the table will shift position.  To prevent it from
  3891.     being shifted to the extent that half of it is on the bottom of one page
  3892.  
  3893.  
  3894.                           Copyright (c) 1993 Piaf, Inc.
  3895.  
  3896.     Surefire S2.0 User's Guide                                       Page 67
  3897.  
  3898.     and the rest on the top of another, you simply enter spaces before it,
  3899.     by pressing (Ctrl+O) to move the whole table to the next page.
  3900.  
  3901.          After the table has been moved to the next page, you may want it to
  3902.     remain independent from being shifted whenever the text on the page
  3903.     before it changes.  To do this, you put a "stop" between the two pages
  3904.     to keep them separate.  The effect of this will be to "split" the
  3905.     document in half, as Surefire will insert new pages before the "stop" if
  3906.     the text on the page before grows beyond the page's length.  Therefore,
  3907.     it is a good idea to put "stops" before tables if you know that the text
  3908.     on the previous page is likely to get smaller or bigger.
  3909.  
  3910.          To make a "stop" (or "hard" page break), move to the page break (a
  3911.     differently-colored area where the two pages join) and press (Spacebar).
  3912.  
  3913.     You will see "STOP" displayed, indicating that text will not flow
  3914.     between these two pages.
  3915.  
  3916.          If at a later time you change your mind about the "stop", you can
  3917.     remove it by placing the cursor on the page break and pressing
  3918.     (Spacebar).  The text from the page after the break can now "reflow"
  3919.     back across the "soft" page break, joining with the text on the previous
  3920.     page.  Now if there is enough room on the previous page for your table,
  3921.     you may bring it back to the previous page either by using Line Select
  3922.     or Block Select and Delete from the Edit menu, or by pressing (Ctrl+D)
  3923.     enough times to delete the spaces added earlier.  As you do this, the
  3924.     table will "flow" from the top of the page to the bottom of the previous
  3925.     page, filling in the gap you just created.
  3926.  
  3927.     Adding and Deleting Pages
  3928.  
  3929.          As you can see, adding "stops" to your document results in breaking
  3930.     your document up into independent sections.  If you are entering text
  3931.     into a document, and are ready to start a new section, you can force
  3932.     Surefire to manually add a page after the current one instead of using
  3933.     the above technique of adding enough lines to fill up the page to make
  3934.     Surefire automatically add one for you.
  3935.  
  3936.          To add a page after the current one, simply press (ALT+P) to bring
  3937.     up the Page menu, move the cursor to "Add Page", and press (Enter).  The
  3938.     cursor will now start at the beginning of the new page.  If you want the
  3939.     page to be independent of previous pages, simply move the cursor up to
  3940.     the place where the two pages join and press (Spacebar) until you see
  3941.     "STOP" displayed.
  3942.  
  3943.          If at a later time, you decide that some pages are unnecessary--a
  3944.     redundant section is just a repeat of earlier arguments, a graph is too
  3945.     confusing and subtracts from your point or a page is mostly blank and
  3946.     its contents can be incorporated into other text--you can remove them by
  3947.     choosing "Delete Page" from the Page menu.  This will remove the page,
  3948.     but not the "stop" unless the page is the last one in the document.
  3949.  
  3950.  
  3951.  
  3952.  
  3953.                           Copyright (c) 1993 Piaf, Inc.
  3954.  
  3955.     Surefire S2.0 User's Guide                                       Page 68
  3956.  
  3957.     Headers and Footers
  3958.  
  3959.          Imagine typing at the top of every page, "Financial Statement of
  3960.     the Albuquerque Sewage and Waste Water Treatment Facility".  After
  3961.     several pages, this could become quite tedious.  But by adding a single
  3962.     header at the top of the first page, you can have Surefire do it for
  3963.     you.
  3964.  
  3965.          Headers and Footers are text that appears in the top and bottom
  3966.     margins and are printed on every page of the document.  There are many
  3967.     uses for headers and footers such as titles, company names, report
  3968.     footnotes, dates and page numbers.  You can even add lines across the
  3969.     top and bottom to accent the text on the page.
  3970.  
  3971.          To place text in the top margin, you simply choose "Header" from
  3972.     the Page menu, move the cursor into position and type.  When you are
  3973.     done typing, press (Esc) to return the cursor to the main typing area of
  3974.     the document.  Footers are made in the same way except that you choose
  3975.     "Footer" from the Page menu.
  3976.  
  3977.        Automatic Page Numbering
  3978.  
  3979.          Many people, when first trying out word processing, do something
  3980.     very understandable but totally useless.  Something in fact that causes
  3981.     them problems:  they type in page numbers wherever a page breaks, just
  3982.     the way they would on a typewriter.
  3983.  
  3984.          That's fine as long as the page breaks stay the same.  But the
  3985.     minute you add or delete text, change margins, or enforce a page break
  3986.     where there was none before, all the page numbers have to be laboriously
  3987.     relocate, one at a time.
  3988.  
  3989.          Luckily, you can have Surefire number the pages automatically for
  3990.     you in a header or footer.  Only the first page needs to be specified--
  3991.     then all the rest of that document is numbered sequentially, no matter
  3992.     how much it shrinks or bulges in the editing process.
  3993.  
  3994.          To insert a page number, you press (ALT+P) to display the Page menu
  3995.     and choose either "Header" or "Footer"--depending on whether you want
  3996.     the number to appear at the top or bottom of the page.  Once the cursor
  3997.     is in the desired margin, you simply move it to the desired location and
  3998.     type #.  When you return the cursor to the regular typing area by
  3999.     pressing (Esc), you will see a "1" displayed where you put the number
  4000.     sign.
  4001.  
  4002.     Page and Paper Sizes
  4003.  
  4004.          In Surefire, page size and paper size are not necessarily the same.
  4005.     Page size is the size of the pages aligned end-to-end on Surefire's
  4006.     "electronic paper" (see "Chapter 5:  Revising a Document").  This may or
  4007.     may not correspond to the size of paper you are using in your printer.
  4008.  
  4009.          There are many times when you'll want to have a page larger or
  4010.     smaller than the size of the paper loaded into your printer.  For
  4011.  
  4012.                           Copyright (c) 1993 Piaf, Inc.
  4013.  
  4014.     Surefire S2.0 User's Guide                                       Page 69
  4015.  
  4016.     example, you might be printing one side of a series of half-page thank
  4017.     you notes that are going to be folded in half.  Or you might be printing
  4018.     mailing labels, name tags or envelopes.  In addition, you may be
  4019.     printing one wide page on two sheets of paper called tiles.
  4020.  
  4021.          To select a new page size, you first bring up the Format window by
  4022.     pressing (ALT+P) (O).  Now, move the cursor to the "Page Size" multiple
  4023.     choice button in the Format window and press (ALT+Z) to bring up a list
  4024.     of choices.  Choose one from the list by pressing (Enter).
  4025.  
  4026.          As you saw in the list, you can either print "tall" or "wide" pages
  4027.     if your printer supports it.  In addition, you can print an oversized
  4028.     (13-7/8 by 11") document in two sections of 8 1/2 by 11" paper (tiles)
  4029.     when the page size is larger than the paper size.  If you want to try
  4030.     this, notice that if you have a header or footer on the page in
  4031.     Surefire, it will be printed on both tiles.  In addition, you can select
  4032.     a custom page size by choosing "Specific Setting" and entering the
  4033.     dimensions in a special window.
  4034.  
  4035.          The "Specific Setting" is good for setting the page size to
  4036.     correspond to custom pages such as invoices and order forms.  In
  4037.     addition, you can use it to create a continuous column of text in a
  4038.     document as you will see later in this chapter.
  4039.  
  4040.          You may have also noticed that you can set the page size to
  4041.     "screen".  This is useful for making data entry forms and is explained
  4042.     later in this manual.  Likewise, printing mailing labels and envelopes
  4043.     is also found in a later chapter.
  4044.  
  4045.          Generally, printers can not print to the edge of the paper.  For
  4046.     example, the HP laser-jet printer uses 1/4 inch of the left and right
  4047.     edges of the paper to grab and move the paper through the printer.  You
  4048.     can tell what part of the page is "printable" in Surefire by pressing
  4049.     (ALT+P) (O).  Doing this will display the Format window.  At the top,
  4050.     you will  see "Print Region:".
  4051.  
  4052.          The "Print Region:" gives the area of the page that will be printed
  4053.     and corresponds to what you see on the screen.  For example, although
  4054.     the dimensions of the paper you have loaded in the printer may be 8 1/2
  4055.     by 11 inches, the actual width of the document page as displayed on the
  4056.     screen is only 80 characters or 8 inches.  If you place text in a header
  4057.     or foot flush left or right, it will be printed on the paper 1/4 of an
  4058.     inch to the left or right of the edge of the paper.  Keep in mind, that
  4059.     the print region is independent of the type of paper you have in the
  4060.     printer.  As long as the paper is the size of the page you specified in
  4061.     the Format window, everything you can type on the screen  will be
  4062.     printed.
  4063.  
  4064.  
  4065.  
  4066.  
  4067.  
  4068.  
  4069.  
  4070.  
  4071.                           Copyright (c) 1993 Piaf, Inc.
  4072.  
  4073.     Surefire S2.0 User's Guide                                       Page 70
  4074.  
  4075.     Printing Your Document
  4076.  
  4077.          Now that you have the layout you want on the screen, see how it
  4078.     looks on paper.  Keep in mind that you may still need to make some final
  4079.     adjustments such as allowing room for the letterhead; putting in the
  4080.     right pinwheel for the font you've selected; and figuring out how many
  4081.     copies you want; etc.
  4082.  
  4083.          When all of the considerations are addressed, and you're ready to
  4084.     print, bring up the Print window by pressing (Alt+F) (P) if it is not
  4085.     already displayed.  Once again, you move around in the window by
  4086.     pressing (Home) and (End).  See "Chapter 23 - More About Printing" for
  4087.     a complete discussion of the options in the Print window.
  4088.  
  4089.  
  4090.  
  4091.  
  4092.  
  4093.  
  4094.  
  4095.  
  4096.  
  4097.  
  4098.  
  4099.  
  4100.  
  4101.  
  4102.  
  4103.  
  4104.  
  4105.  
  4106.  
  4107.  
  4108.  
  4109.  
  4110.  
  4111.  
  4112.  
  4113.  
  4114.  
  4115.  
  4116.  
  4117.  
  4118.  
  4119.  
  4120.  
  4121.  
  4122.  
  4123.  
  4124.  
  4125.  
  4126.  
  4127.  
  4128.  
  4129.  
  4130.                           Copyright (c) 1993 Piaf, Inc.
  4131.  
  4132.     Surefire S2.0 User's Guide                                       Page 71
  4133.  
  4134.     Chapter 10     -         The Calculator
  4135.  
  4136.          The pop-up calculator is handy and easy to use. In fact, it offers
  4137.     you a way to do even more powerful calculations than you can do with
  4138.     your pocket calculator. It can be used simply to sum a group of numbers
  4139.     or obtain a more complex result such as the payment amount for a loan.
  4140.     The result can even be pasted right into your document.
  4141.  
  4142.          To bring up the calculator window, Calculator is selected from the
  4143.     Operate Menu, or the short cut (Alt+H) is typed. The calculator has one
  4144.     line into which you can type. This "entry line" is at the middle of the
  4145.     calculator. The simplest use is to type in numbers in the entry line.
  4146.     You may also use the operators (+, -, *, /) to add, subtract, multiply
  4147.     and divide.  Whenever (Enter) is typed, the current value or expression
  4148.     that you have typed is evaluated. The result is added to the value
  4149.     already shown in the result area. The "result area" is located at the
  4150.     upper left corner of the window.
  4151.  
  4152.          When you first display the Calculator, the result area will be
  4153.     cleared. As you use the Calculator during your Surefire session,  the
  4154.     result area will contain the value that was there when the Calculator
  4155.     was last visible. Press (Esc) to close the Calculator and return to your
  4156.     document.
  4157.  
  4158.          To start a new calculation we should first clear the previous
  4159.     result.  This is done by selecting the CLEAR button. Use the (End) or
  4160.     (down arrow) key to position on CLEAR and press (Enter). Notice that the
  4161.     result area is cleared.  The entry line will be cleared when you begin
  4162.     to type a new expression. You can also clear the entry line expression
  4163.     by pressing (Ctrl + K) when the cursor is on the entry line.
  4164.  
  4165.          You can use parentheses () to group parts of an "expression".
  4166.  
  4167.     Mathematical Expressions
  4168.  
  4169.          Mathematical expressions are formulas that use numbers, numeric
  4170.     operators and numeric functions. Surefire supports the following numeric
  4171.     operators:
  4172.  
  4173.          Two number operators     One number operators
  4174.  
  4175.          +    Addition             -         Negation
  4176.          -    Subtraction
  4177.          *    Multiplication
  4178.          /    Division
  4179.  
  4180.          The operators in the first column are used with two numbers. For
  4181.     example, you can multiply two numbers like "3 * 2". The following is
  4182.     also valid: "3 * 2 + 4".  This will multiply 3 with 2 and add 4 to the
  4183.     result, which is 10.
  4184.  
  4185.          What if you wrote "4 + 3 * 2"?  Well, the result is still 10 since
  4186.     4 + 6 is 10.  This is because division and multiplication have a higher
  4187.     precedence than addition and subtraction.  Precedence means that numbers
  4188.  
  4189.                           Copyright (c) 1993 Piaf, Inc.
  4190.  
  4191.     Surefire S2.0 User's Guide                                       Page 72
  4192.  
  4193.     with "*" (multiplication) or "/" (division) between them are calculated
  4194.     first, even if they appear to the right of other values.  You can tell
  4195.     Surefire to override the precedence rules by enclosing parts of an
  4196.     expression in parentheses ().
  4197.  
  4198.          Suppose you really wanted to add 3 with 4 and then multiply by 2.
  4199.     This can be done by associating  the expression "4 + 3". To do this,
  4200.     parentheses are put around this part of the expression. The expression
  4201.     is now: "(4 + 3) * 2" and the new result is 14, since 7 multiplied by 2
  4202.     is 14.  Any number of matched left and right parentheses can be used in
  4203.     expressions.
  4204.  
  4205.           The negation operator is nothing more than a minus sign (-) before
  4206.     a number or expression.  It is used to specify a negative number such as
  4207.     "-10" or "-(30*2 - 10)" which evaluates to "-50".  Once you have a
  4208.     negative value, you can use it in an expression. For example, if you
  4209.     wanted to multiply -10 by 4 you could enter either: "-10 * 4" or "4 *
  4210.     -10". This expression would give the result of -40.
  4211.  
  4212.     Using Functions
  4213.  
  4214.          Mathematical expressions can also contain functions. Functions
  4215.     allow you to perform more sophisticated operations on values than you
  4216.     can with numeric operators alone.  For example, you can use a function
  4217.     to calculate the present value of your mortgage loan or sine of some
  4218.     angle. Functions in the Surefire Calculator work with numeric values.
  4219.     All functions in Surefire start with the special character "@". If a
  4220.     function uses arguments, these arguments are specified within
  4221.     parentheses and each is separated by a comma. The function @SQRT(n) uses
  4222.     one argument while the function @PV(pmt, int, term) requires three
  4223.     arguments.
  4224.  
  4225.          Two other numeric functions available in the calculator are @ABS(n)
  4226.     and @SIN(n). These functions are used to determine the absolute value
  4227.     and sine of a number respectively.  They are used by substituting "n"
  4228.     with the number you want to evaluate. There are many functions that can
  4229.     be used in the calculator.
  4230.  
  4231.          To see what functions are available for use in the calculator, type
  4232.     (Alt+Z) when the cursor is positioned in the calculator's entry line.
  4233.     This will display a pop-list of all available functions with
  4234.     placeholders for their arguments.  You may scroll through this list
  4235.     using the (down arrow) and (up arrow) keys to find the one you want.
  4236.     When the desired function is highlighted, you can choose it.  Press
  4237.     (Enter), and that function will be put into the entry line starting
  4238.     where the cursor is when you typed (ALT+Z).  You can then replace the
  4239.     arguments with the right numbers or other smaller expressions. When the
  4240.     expression is complete, press (Enter) once more to have the result of
  4241.     the expression added to the value in the result area.
  4242.  
  4243.  
  4244.  
  4245.  
  4246.  
  4247.  
  4248.                           Copyright (c) 1993 Piaf, Inc.
  4249.  
  4250.     Surefire S2.0 User's Guide                                       Page 73
  4251.  
  4252.          All functions that are available in Surefire and in the calculator
  4253.     are summarized in "Appendix A: Surefire Function Reference" located near
  4254.     the end of this manual.  You may use any of the General Mathematical
  4255.     Functions, Trigonometric Functions, Logarithmic Functions and Financial
  4256.     Functions described on pages A-1 to A-3 within the calculator.
  4257.  
  4258.          All the expressions and functions available for the calculator can
  4259.     also be used as field commands.  Field commands can do many more complex
  4260.     things like manipulate text and dates,  perform database operations and
  4261.     even link databases together.  After you gain an understanding of fields
  4262.     in Surefire, you may read "Chapter 14: Introducing Field Commands" for
  4263.     complete information.
  4264.  
  4265.  
  4266.     Calculator Errors
  4267.  
  4268.          If the Calculator cannot evaluate what was typed in the entry line,
  4269.     the word ERROR is displayed in the upper right corner of the window. The
  4270.     previous result is not disturbed.  This error message will go away when
  4271.     the next good expression is evaluated or the result area is cleared. To
  4272.     clear a calculator error, press (down arrow) to move the cursor to the
  4273.     CLEAR button. Press (Enter). ERROR will disappear. You can now return to
  4274.     the entry line to type a valid expression.
  4275.  
  4276.  
  4277.     Pasting a Result
  4278.  
  4279.          The resulting value of a calculation can be put directly into your
  4280.     document by choosing the PASTE button.  For the time being let's assume
  4281.     that your document does not have any fields.  Since you are therefore
  4282.     working in Text edit mode, the value in the result area will be put onto
  4283.     the document page at the location where the cursor was when you opened
  4284.     the Calculator window. The value is inserted or overtyped depending on
  4285.     the current Insert or Typeover status.  If Word Wrap is on, normal
  4286.     wrapping will occur.
  4287.  
  4288.          For information on pasting a result when there are fields in a
  4289.     document, read the appropriate section of "Chapter 13: Working With
  4290.     Fields".
  4291.  
  4292.  
  4293.  
  4294.  
  4295.  
  4296.  
  4297.  
  4298.  
  4299.  
  4300.  
  4301.  
  4302.  
  4303.  
  4304.  
  4305.  
  4306.  
  4307.                           Copyright (c) 1993 Piaf, Inc.
  4308.  
  4309.     Surefire S2.0 User's Guide                                       Page 74
  4310.  
  4311.     Chapter 11     -    Introduction to Fields
  4312.  
  4313.          A field is an area in the document that can contain a value or
  4314.     formula. It can hold the monthly payment of a property lease or the
  4315.     totaled expenses for a recent trip. It can act as a placeholder in a
  4316.     form letter or a way to enter information into a database. A field can
  4317.     contain today's date, your friend's  name or enable you to view another
  4318.     document. Fields are the key to making Smart Documents. These documents
  4319.     can act like fill-in-the-blank forms or control complete applications.
  4320.  
  4321.          You are already somewhat familiar with fields because you have used
  4322.     them in Surefire system windows. Except for multiple choice buttons, the
  4323.     fields that you can create are the same. For example, if you look at the
  4324.     Get File window, you will see three fields: one data entry field or text
  4325.     field, and two action buttons or button fields.
  4326.  
  4327.          There are five types of fields that you can create and use in a
  4328.     document. They are text, numeric, date, logical and button fields.
  4329.  
  4330.          In the next two chapters you will learn about each of the different
  4331.     field types; numeric, text, date, logical and button and their
  4332.     attributes. These attributes determine how field values are displayed
  4333.     and stored. In the chapter "Working with Fields", you will learn how to
  4334.     move fields around, modify the attributes of existing fields and work
  4335.     with fields and their values.
  4336.  
  4337.  
  4338.     Fields and Forms
  4339.  
  4340.          We introduce fields by showing how you can use them to make
  4341.     documents that look like forms. Most of you are already familiar with
  4342.     pre-printed paper forms. On these forms, most of the words are already
  4343.     on the page. You need to just fill in the blanks with additional
  4344.     information to complete a form. Examples of common forms are lease
  4345.     agreements, order forms, expense  reports and standard contractual
  4346.     agreements.
  4347.  
  4348.          With Surefire, you design and lay out a form by first using
  4349.     Surefire's word processing capabilities to enter text and graphics on
  4350.     the document page. Then you combine this with the fields that you place
  4351.     anywhere within your document.  These fields will hold the data that is
  4352.     important to you and the task that your document will help you solve.
  4353.  
  4354.  
  4355.     Editing and Using Documents
  4356.  
  4357.          The basic concepts for editing documents with fields are the same
  4358.     as for editing documents without fields. Inserting and wrapping text,
  4359.     cut & paste, and saving and getting documents are among the operations
  4360.     that are essentially the same.  And you can use the (End) and (Home)
  4361.     keys to conveniently move around your document via fields just as you do
  4362.     in Surefire system windows. The only new concept is how to create and
  4363.     modify the fields' formatting capabilities.
  4364.  
  4365.  
  4366.                           Copyright (c) 1993 Piaf, Inc.
  4367.  
  4368.     Surefire S2.0 User's Guide                                       Page 75
  4369.  
  4370.          The concepts of editing and using a document are very important in
  4371.     Surefire. Very simply, editing a document allows you to change the
  4372.     format or layout of a document with fields, while using a document
  4373.     allows you to enter, display, store, calculate and otherwise manipulate
  4374.     the values in fields.
  4375.  
  4376.          Later in the manual, we will discuss how to edit the actual values
  4377.     that these fields may hold. These values may be manipulated by commands
  4378.     and may be stored in a database. And, you can use commands to cause
  4379.     actions to happen, such as displaying other documents, searching a
  4380.     database, etc. This is just like the action buttons in system windows.
  4381.     To start, you will learn how to create fields and use them in simple
  4382.     ways.
  4383.  
  4384.  
  4385.     Moving Around a Document via Fields
  4386.  
  4387.          When there are fields present in a document, you can move around in
  4388.     two different ways.  The cursor can be "tied to fields" or the cursor
  4389.     can be "free".  This is true whether you are "editing" the document
  4390.     (i.e. Document edit mode) or "using" the fields of the document (i.e.
  4391.     Use mode). You switch between these two ways of moving around by
  4392.     pressing the free cursor key, (F3).
  4393.  
  4394.          When the cursor is free, an "F" can be seen on the status line.
  4395.     Otherwise, the cursor is tied to the fields.
  4396.  
  4397.          There always is a field called the "current field".  This is the
  4398.     field that is highlighted. A field becomes highlighted, and thus, the
  4399.     current field when the cursor is moved onto it.
  4400.  
  4401.        Cursor Tied To Fields
  4402.  
  4403.          When the cursor is tied to the fields, basic movement is identical
  4404.     to the way you move around among fields in the Surefire windows. The
  4405.     arrow keys will move you to the next field up, down, left and right as
  4406.     long as they are lined up.  (Home) and (End) will move you to the
  4407.     previous or next field in the same direction as you would read text.
  4408.     This is generally from left to right and top to bottom. (Ctrl + Home)
  4409.     and (Ctrl + End) will bring you to the first or last field on a line.
  4410.  
  4411.           The above keys work only within a single page except for (Home)
  4412.     and (End).  Pressing these keys will continue to bring you to the next
  4413.     or previous field even if it exists on some other page of your document.
  4414.  
  4415.     In addition, (Ctrl + Page Up) and (Ctrl + Page Down) will bring you to
  4416.     the first field of the previous or next page. This is similar to using
  4417.     these keys when the cursor is free. These keys are listed in the table
  4418.     on the following page.
  4419.  
  4420.  
  4421.  
  4422.  
  4423.  
  4424.  
  4425.                           Copyright (c) 1993 Piaf, Inc.
  4426.  
  4427.     Surefire S2.0 User's Guide                                       Page 76
  4428.  
  4429.        Free Cursor
  4430.  
  4431.          When the cursor is free, you may move around a document with fields
  4432.     in exactly the same way as you move around a document with only text.
  4433.     The cursor is free to be positioned anywhere.  What you can do once you
  4434.     position the cursor is different depending upon whether you are editing
  4435.     the document or using the document to enter values into fields.  The
  4436.     sections Editing Fields and Entering Information into Fields in the
  4437.     chapter "Working with Fields" will point out these differences. The keys
  4438.     that you may use to move the cursor are listed in the table below.
  4439.  
  4440.          To Move                                      Press
  4441.  
  4442.          Left one field                               Home
  4443.          Right one field                              End
  4444.          Up one field                                 Page Up
  4445.          Down one field                               Page Down
  4446.          To the start of the line in a text field     Ctrl + Home
  4447.          To the end of the line in a text field       Ctrl + End
  4448.          To  the previous page                        Ctrl + Page Up
  4449.          To the next page                             Ctrl + Page Down
  4450.  
  4451.                         Key Usage - Cursor Tied to Fields
  4452.  
  4453.          To Move                                      Press
  4454.  
  4455.          To the beginning of the line                 Home
  4456.          To the end of the line                       End
  4457.          To the previous screen                       Page Up
  4458.          To the next screen                           Page Down
  4459.          To the beginning of the document             Ctrl + Home
  4460.          To the end of the document                   Ctrl + End
  4461.          To the previous page                         Ctrl + Page Up
  4462.          To the next page                             Ctrl + Page Down
  4463.  
  4464.                              Key Usage - Free Cursor
  4465.  
  4466.  
  4467.     Creating Fields
  4468.  
  4469.          Fields are created by using the Field Create window. Before opening
  4470.     the Field Create window, position the cursor in the document to where
  4471.     the upper left corner of the field will be put. Then, open the Field
  4472.     Create window by choosing "Create" on the Field menu or pressing
  4473.     (ALT+C).
  4474.  
  4475.          The first multiple choice button allows you to flip through all the
  4476.     types of fields that can be created, displaying all the field attribute
  4477.     options for each.  You may press (Spacebar) repetitively to show the
  4478.     available field types or you may press (ALT+Z) to show a pop-list with
  4479.     these types. After the desired field type is found, you may specify the
  4480.     individual field attributes by moving to the various attribute settings
  4481.     in the window.  These initial values may easily be changed after the
  4482.     field is created.
  4483.  
  4484.                           Copyright (c) 1993 Piaf, Inc.
  4485.  
  4486.     Surefire S2.0 User's Guide                                       Page 77
  4487.  
  4488.          The field is then created by selecting OK.  If the field being
  4489.     created is a date, logical or button field, it will have a pre-defined
  4490.     size. This type of field is immediately inserted into the page or
  4491.     overwritten onto the page depending on whether Insert or Typeover mode
  4492.     is on. The size of date and logical fields are determined by the format
  4493.     that you have chosen. The size of a button field is determined by the
  4494.     label that you have given it.
  4495.  
  4496.          Note:   Surefire will not allow you to create a new field on top of
  4497.     an existing field.
  4498.  
  4499.     Sizing Text and Numeric Fields
  4500.  
  4501.           Text and numeric fields are sized when they are created after the
  4502.     Create Window is closed. When you choose OK for these fields, the cursor
  4503.     is placed at the starting position that you have indicated for the
  4504.     field.  At this time, using the (right and down arrow) keys allows you
  4505.     to specify the exact size of the field on the page.  When the sizing is
  4506.     finished, press (Enter). If you wish to cancel the field create
  4507.     operation, you can press the (Esc) key. If you bump up against another
  4508.     field, Surefire will not allow you to continue in that direction.  Just
  4509.     use the (left and up arrows) to make the field smaller.  You can move
  4510.     the field or change its size later.
  4511.  
  4512.          The sizing operation will be affected by the current insert mode.
  4513.     If Insert  is on, every time the field is sized to the right, the text
  4514.     and fields to its right are moved over.  If Wrap is on, wrapping is also
  4515.     done. A text or numeric field may be a multiple line field. Multiple
  4516.     line fields cannot be created when Insert is on.  You must switch to
  4517.     Typeover  mode before you open the Create Window to create a multiple
  4518.     line field.  When a field is created in Typeover mode, any text under
  4519.     the field will be overwritten.
  4520.  
  4521.     Field IDs
  4522.  
  4523.           You do not need to worry about naming or labeling each field that
  4524.     you create. If you want, you may type descriptive text near a field so
  4525.     that you know what the field is used for. Surefire assigns an ID  to a
  4526.     field when it is created. This ID is a name that Surefire uses to
  4527.     distinguish one field from another. Within a document, no two fields
  4528.     will have the same ID. IDs are discussed in greater detail in the
  4529.     chapters Using Field Commands and Spreadsheets.
  4530.  
  4531.  
  4532.  
  4533.  
  4534.  
  4535.  
  4536.  
  4537.  
  4538.  
  4539.  
  4540.  
  4541.  
  4542.  
  4543.                           Copyright (c) 1993 Piaf, Inc.
  4544.  
  4545.     Surefire S2.0 User's Guide                                       Page 78
  4546.  
  4547.     Chapter 12     -    Field Types and Attributes
  4548.  
  4549.          A field restricts the type of information  that is put into it.
  4550.     Generally, the type of information that can be put into a field
  4551.     corresponds to the type of field it is.  A field can be numeric, text,
  4552.     date, logical or button. Numeric, text and date fields allow only
  4553.     numbers, text and dates in them.  Logical fields allow only yes or no
  4554.     (or true or false) as their information.
  4555.  
  4556.          Button fields are somewhat different in that they do not allow any
  4557.     information to be entered into them. Think of a button that you would
  4558.     press on your VCR or stereo.  This button may turn on the device or
  4559.     cause a tape to be rewound. A button field in Surefire has a similar
  4560.     purpose. They provide a means for doing specific actions when they are
  4561.     "pressed".  These actions are specified as field commands which are
  4562.     discussed in detail in later chapters.
  4563.  
  4564.          The precise way in which fields handle information is determined by
  4565.     their field attributes.  There are two types of field attributes: format
  4566.     attributes and data attributes.  Field attributes are set by using the
  4567.     Create Field or Modify Field windows.  These windows are opened by
  4568.     choosing "Create... Alt+C" or "Modify..  Alt+M" from the Field menu and
  4569.     are described in this and the following chapters. You must be in
  4570.     Document Edit mode to give or change field attributes
  4571.  
  4572.  
  4573.     Format Attributes
  4574.  
  4575.          The exact way in which a field accepts and displays information is
  4576.     determined by the specification of its format attributes. For example,
  4577.     format attributes for the numeric field include whether numbers are to
  4578.     be displayed with $'s and commas for currency and where the decimal
  4579.     point is to be placed.  All the format attributes of all fields are
  4580.     described later in this chapter.
  4581.  
  4582.          Many format attributes such as text and numeric justification,
  4583.     currency symbol placement, etc., take effect after entry of a value into
  4584.     a text field. Entry occurs when you move the cursor out of the field or
  4585.     press (Enter).
  4586.  
  4587.  
  4588.     Data Attributes
  4589.  
  4590.          The data attributes describe whether the information stored within
  4591.     a field is stored in a database or not.  These data attributes are fully
  4592.     described later in this manual in the chapter entitled "Introduction to
  4593.     Databases".
  4594.  
  4595.  
  4596.  
  4597.  
  4598.  
  4599.  
  4600.  
  4601.  
  4602.                           Copyright (c) 1993 Piaf, Inc.
  4603.  
  4604.     Surefire S2.0 User's Guide                                       Page 79
  4605.  
  4606.     Text Fields
  4607.  
  4608.          Text fields provide the most general way of entering information.
  4609.     Any text that you can normally put in a document can be put in a text
  4610.     field in the exact same way. There are three main differences. One
  4611.     difference is that the boundaries for the text are the field limits
  4612.     rather than the margins on the page. Another difference is in the
  4613.     flexibility of  formatting the text after entry. The last difference is
  4614.     that text field values can be stored in a database and used  in
  4615.     formulas. The following sections describe the format attributes
  4616.     available for text fields.
  4617.  
  4618.        Justified Text Formats
  4619.  
  4620.          Text justification can occur after entry of a value into a text
  4621.     field. The text can be left justified, right justified or centered
  4622.     within the field.  This is done by setting the first format multiple
  4623.     choice button to Left Justify, Right Justify or Center.
  4624.  
  4625.        Unjustified Text Formats
  4626.  
  4627.          There are two other format options on this multiple choice button.
  4628.     They are Don't Justify and Wrap Text.  Nothing happens on entry when
  4629.     either of these attributes is set. When Don't Justify is set, the text
  4630.     stays wherever you type it within the field. When Wrap Text is set, word
  4631.     wrap occurs whenever the text needs to, just like within a page.
  4632.     Changing this attribute to Wrap Text after there is already some text in
  4633.     the field does not remove white space or break words for you. Rather, it
  4634.     changes the way the field organizes the text during subsequent editing
  4635.     in the field.
  4636.  
  4637.        Single vs Multiple Lines
  4638.  
  4639.          Text Fields can have one or more lines in them. All format
  4640.     attributes except wrap apply to single line text fields. Wrap and Don't
  4641.     Justify behave identically for single line fields.
  4642.  
  4643.          For multiple line text fields, justification occurs on a line by
  4644.     line basis.  For example, if Center is specified, every line will be
  4645.     centered when it is entered.  If Wrap is set, text is formatted
  4646.     according to the same wrap rules discussed for general word processing
  4647.     except it occurs within the boundaries of the field.
  4648.  
  4649.  
  4650.     Numeric Fields
  4651.  
  4652.          Numeric fields provide the means to enter various types of numbers.
  4653.     These can be decimal or integer numbers, percentages or dollars, etc.
  4654.     When entering information into a numeric field, only numbers and a few
  4655.     specific characters such as the minus sign ("-") and the decimal point
  4656.     (".") are allowed.  All other characters are ignored.
  4657.  
  4658.  
  4659.  
  4660.  
  4661.                           Copyright (c) 1993 Piaf, Inc.
  4662.  
  4663.     Surefire S2.0 User's Guide                                       Page 80
  4664.  
  4665.        Numeric Appearance
  4666.  
  4667.          The first format multiple choice button in the Create or Modify
  4668.     Field window allows you to choose the general appearance of the number
  4669.     that will be displayed in your field. These choices are summarized as
  4670.     follows:
  4671.  
  4672.          Appearance          Description
  4673.  
  4674.          Decimal             This is a number containing a single decimal
  4675.                              point somewhere within it.
  4676.  
  4677.          Comma               This is the same as Decimal except commas are
  4678.                              inserted automatically at every third place.
  4679.  
  4680.          Percent             This is a number that always displays the
  4681.                              percent sign ("%") and always divides the
  4682.                              contained number by 100.  This is very
  4683.                              convenient when the field is referenced by a
  4684.                              formula. Field Commands and formulas are
  4685.                              described later in this manual.
  4686.  
  4687.          Currency            Currency will always display a dollar sign '$'
  4688.                              at the left of the number.  It will also
  4689.                              provide commas at every third digit.
  4690.  
  4691.        Negative Representation
  4692.  
  4693.          The second format multiple choice button provides two ways in which
  4694.     a negative value can be displayed. The normal way is with a minus sign
  4695.     '-'. This is specified by choosing "-Negative".  The other way puts the
  4696.     number inside a set a parentheses.  This is generally desirable when
  4697.     working with accounting information. This is specified by choosing
  4698.     "(Negative)".
  4699.  
  4700.        Numeric Justification
  4701.  
  4702.          The third multiple choice button allows you to set the
  4703.     justification for the field. Numbers can be left or right justified. As
  4704.     with text fields, the justification occurs after you enter a value in
  4705.     the field.
  4706.  
  4707.        Other Numeric Format Settings
  4708.  
  4709.          In addition to the three multiple choice buttons, there are three
  4710.     other items that you may specify for numeric fields. The first is
  4711.     labeled "Decimal Place:". The number entered here indicates how many
  4712.     places to the right of the decimal point should be maintained in the
  4713.     field. Surefire will use this setting to display the value.
  4714.          The second item is labeled "Integer?".  Here one can choose Y for
  4715.     Yes or N for No.  Yes indicates that the number is to be rounded
  4716.     automatically to the nearest whole number before being displayed.
  4717.     Internally, however, the number is remembered to be the exact value
  4718.  
  4719.  
  4720.                           Copyright (c) 1993 Piaf, Inc.
  4721.  
  4722.     Surefire S2.0 User's Guide                                       Page 81
  4723.  
  4724.     entered.  If the number of decimal places is set to one or greater and
  4725.     you typed in a number with a fractional part (i.e some digits to the
  4726.     right of the decimal point), after you finished entering it, the
  4727.     fractional part would not be displayed.
  4728.  
  4729.          The third item is labeled "Pad". You use this attribute to say
  4730.     whether the number is displayed with leading zeros or blanks to fill up
  4731.     the width of the field. If you choose "Blank if Zero", the field will
  4732.     display the number zero as a blank or empty field. This setting is
  4733.     useful if you have a form with many 0 values and you want to improve
  4734.     readability.
  4735.  
  4736.        Single vs Multiple Cells
  4737.  
  4738.          Numeric fields can contain more than one "cell". Each cell can
  4739.     contain one number.  Multiple cell numeric fields have more than one
  4740.     cell stacked vertically.  All cells for any one numeric field are always
  4741.     the same size and have the same format attributes. A multiple cell
  4742.     numeric field is created by using Typeover mode and the (down arrow) key
  4743.     to show that the field occupies more than one line. Multiple cell
  4744.     numeric fields are useful for designing smart documents that look like
  4745.     spreadsheets.
  4746.  
  4747.     Date Fields
  4748.  
  4749.          Date fields provide ways to enter and display dates.  Date fields
  4750.     always assure that the dates contained within them are valid dates.
  4751.     That is, only 12 months can be represented and the appropriate valid
  4752.     days for a month can be represented.  In addition, you can only specify
  4753.     February 29th for leap years.
  4754.  
  4755.        Date Styles
  4756.  
  4757.          There are three styles of date format.  The format is specified by
  4758.     using the format multiple choice button on the Create or Modify Fields
  4759.     windows. The three formats are as follows:
  4760.  
  4761.          Date Style     Description
  4762.  
  4763.          mm/dd/yy       This format allows you to enter the month, day and
  4764.                         year by the 2 digit number that represents it.
  4765.               Example: 5/4/32
  4766.  
  4767.          dd-mmm-yy      This format specifies the day first as a two digit
  4768.                         number, then the month as the three letter
  4769.                         abbreviation and finally the last two digits of the
  4770.                         year.
  4771.               Example: 13-sep-67
  4772.  
  4773.          Month dd, yyyy This format completely spells out the name of the
  4774.                         month followed by the day and then the year.
  4775.               Example: November 23, 1945
  4776.  
  4777.  
  4778.  
  4779.                           Copyright (c) 1993 Piaf, Inc.
  4780.  
  4781.     Surefire S2.0 User's Guide                                       Page 82
  4782.  
  4783.          With the first two formats you will be able to enter dates within
  4784.     the current century Generally, these dates will be between Jan 1, 1900
  4785.     and Dec 31, 1999. The last format allows entry and display of dates that
  4786.     are from January 1, 0001 through December 31, 9999.
  4787.  
  4788.        Default to Today
  4789.  
  4790.          The "Default to Today?" option is specified by toggling this
  4791.     logical choice button to Y for yes or N for no.  You toggle by pressing
  4792.     the (Spacebar) until you see the desired value.  If this value is set to
  4793.     Yes, the field will contain today's date, in the style you specified,
  4794.     when the document is read in.  This is convenient for forms and letters
  4795.     that need to be dated with the current date. You would not have to look
  4796.     at your calendar each time and fill it in.  If necessary, however, you
  4797.     could change it.
  4798.  
  4799.          Even if this option is not set for a field, you can easily enter
  4800.     today's date. With the cursor positioned in the date field, type a
  4801.     letter 't' or 'T'. You will see today's date displayed in this field in
  4802.     the appropriate format. This is a shortcut for entering today's date in
  4803.     a date field.
  4804.  
  4805.  
  4806.     Logical Fields
  4807.  
  4808.          Logical Fields provide a way of limiting the information to either
  4809.     a yes/no or true/false answer.  A logical field is like a simple
  4810.     multiple choice button with two choices.  The style of the choices can
  4811.     be specified.  There are four logical styles.  These are selected by
  4812.     choosing the appropriate style with the format multiple choice button.
  4813.     The available styles are "Y/N", "Yes/No", "YES/NO" and "True/False".
  4814.  
  4815.     Button Fields
  4816.  
  4817.          As mentioned earlier, nothing can be directly entered into a button
  4818.     field.  A button field can be "pushed" by pressing the (Enter) key when
  4819.     the cursor is on the button.  This can cause an action to occur. A field
  4820.     command describes the action that will take place when the button is
  4821.     pushed.  An example of such a command is one that displays another
  4822.     document when the button is pushed. Without a command, pushing a button
  4823.     will do nothing. Field commands are described later in this manual.
  4824.  
  4825.          There is only one attribute to specify for buttons.  This is a
  4826.     label.  The label is any text that will represent the button in the
  4827.     document.  You type the label that you desire next to the word Label: in
  4828.     the Field Create Window. Then choose OK or press (Ctrl+Enter) to create
  4829.     the button.
  4830.  
  4831.  
  4832.  
  4833.  
  4834.  
  4835.  
  4836.  
  4837.  
  4838.                           Copyright (c) 1993 Piaf, Inc.
  4839.  
  4840.     Surefire S2.0 User's Guide                                       Page 83
  4841.  
  4842.     Fixed vs Auto Sized Fields
  4843.  
  4844.          Text, Numeric and Date fields can be set to be Fixed Size or Auto
  4845.     Sized. When a field is set to Fixed Size, it always takes up the same
  4846.     amount of space on the page no matter what the content of the field is.
  4847.  
  4848.          If Auto Sizing is set however, the document will automatically
  4849.     adjust based on the width of the value in the field.  For a text field
  4850.     with multiple lines, empty blank lines at the bottom of the field will
  4851.     also be removed causing the document to contract further. This automatic
  4852.     adjustment is done when you change to Text mode.  If no changes are made
  4853.     in Text mode, returning to Use the document will cause Auto Sized fields
  4854.     to expand back to their maximum length. The notions of Using a document
  4855.     versus editing a document as text or as a document are covered in the
  4856.     following chapter.
  4857.  
  4858.          Auto Sizing can be used to personalize letters with people's names,
  4859.     for example.  The name is put in an auto sized field so that when the
  4860.     document is printed, the spacing will be adjusted appropriately to
  4861.     produce a letter that looks like it was typed on a typewriter. Auto
  4862.     sizing will occur automatically during a Search & Print operation.  This
  4863.     operation is often referred to as "Mail-Merge".  See Chapter 20:  "Forms
  4864.     and Form Letters" for a complete description of this process.
  4865.  
  4866.          With regard to date fields, auto sizing only affects date fields
  4867.     formatted where the month name is fully spelled out.
  4868.  
  4869.  
  4870.  
  4871.  
  4872.  
  4873.  
  4874.  
  4875.  
  4876.  
  4877.  
  4878.  
  4879.  
  4880.  
  4881.  
  4882.  
  4883.  
  4884.  
  4885.  
  4886.  
  4887.  
  4888.  
  4889.  
  4890.  
  4891.  
  4892.  
  4893.  
  4894.  
  4895.  
  4896.  
  4897.                           Copyright (c) 1993 Piaf, Inc.
  4898.  
  4899.     Surefire S2.0 User's Guide                                       Page 84
  4900.  
  4901.     Chapter 13     -    Working With Fields
  4902.  
  4903.          In the previous two chapters you were introduced to the concept of
  4904.     fields and how to create them. In this chapter you will learn how to
  4905.     change a field's formatting characteristics and how to move fields
  4906.     around in a document.
  4907.  
  4908.  
  4909.     Editing Fields
  4910.  
  4911.          At some point, you may want to revise a document that has fields.
  4912.     You can edit just the fields or the fields and the text of the document
  4913.     at the same time. Editing fields in a document means changing the way
  4914.     they look, changing their size, moving them around or removing them
  4915.     altogether. You will not be changing their values. Any values that are
  4916.     in the fields will be preserved. To edit a document that is a
  4917.     combination of text and fields you must switch to document edit mode. To
  4918.     do this, you choose "Document" from the Operate menu or press (ALT+F9).
  4919.  
  4920.          When you look at a document while in Document Edit mode, the fields
  4921.     are shown filled with letters that indicate their type: n for numeric,
  4922.     c for text, L for logical, d, m and y for date and B for button. This
  4923.     provides additional feedback that you are going to be editing the layout
  4924.     of the document and not field values. You can edit both the textual
  4925.     portions of the document and the fields together.
  4926.  
  4927.          As you switch between using and editing the document, some fields,
  4928.     such as a numeric field with a Currency attribute carry more information
  4929.     than the fact that it is a number. For example, $nnnnn.nn means that the
  4930.     field is a currency value ($) with 2 decimal places (.nn).
  4931.  
  4932.          Fields can be edited only when the Operate mode is Document edit.
  4933.     When there are no fields in the document, the Operate mode is Text edit
  4934.     since only text can be edited. The Operate mode becomes Document edit
  4935.     automatically after you create the first field in a document. You can
  4936.     also explicitly choose "Document" from the Operate menu at any time when
  4937.     there are fields in the document.
  4938.  
  4939.          If you type text when the cursor is not on a field, the text will
  4940.     be put on the page just as if you were doing only word processing.  All
  4941.     the word processing rules apply. Conversely,  when you type while the
  4942.     cursor is on a field, nothing will happen.
  4943.  
  4944.  
  4945.  
  4946.  
  4947.  
  4948.  
  4949.  
  4950.  
  4951.  
  4952.  
  4953.  
  4954.  
  4955.  
  4956.                           Copyright (c) 1993 Piaf, Inc.
  4957.  
  4958.     Surefire S2.0 User's Guide                                       Page 85
  4959.  
  4960.     Single and Multiple Line Fields
  4961.  
  4962.          Fields that occupy a single line are treated like words.  Inserting
  4963.     text, wrap and all the word processing operations move the field just as
  4964.     if it were a word.  This lets you enter text easily without having to
  4965.     worry about positioning in-line fields. For example, in a lease or
  4966.     contract, many fields are found in paragraphs with normal text on either
  4967.     side. Changing the wording of the paragraph should move the field
  4968.     automatically.
  4969.  
  4970.          Multiple line fields, or fields that occupy more than one line are
  4971.     handled a little differently.  You can insert text around these fields
  4972.     as long as there is enough white space to accommodate the new
  4973.     characters. Multiple lined fields are moved up and down as lines are
  4974.     inserted and deleted above and below them.  You cannot move these fields
  4975.     left or right in this manner.  This must be done by using Cut and Paste.
  4976.     See the section Moving and Copying fields later in this chapter for a
  4977.     complete discussion of this process.
  4978.  
  4979.          Note:  There is one other limitation to placing multiple line
  4980.     fields. That is, multiple line fields cannot be broken up between pages.
  4981.     As a result, if you force a multiple line field across a page boundary,
  4982.     by inserting or deleting lines, all lines that the field crosses will be
  4983.     pushed up or down across the page boundary  together.
  4984.  
  4985.     Modifying Field Attributes
  4986.  
  4987.          You can change the attributes of a field by putting the cursor on
  4988.     the field that you wish to modify and choosing "Modify...  Alt+M" on the
  4989.     Field menu. This will display the Modify Field window. You will note
  4990.     that this window is the same as the Create Field window except that you
  4991.     can not change the field type. All of the currently set field attributes
  4992.     for the field you have selected are displayed and any of them can be
  4993.     changed. The changes take effect when you choose OK. You can change your
  4994.     mind, as usual, by choosing CANCEL.
  4995.  
  4996.     Resizing Fields
  4997.  
  4998.          Text and Numeric fields can be resized interactively.  You do this
  4999.     by placing the cursor on the field that you wish to resize. Then, by
  5000.     using the arrow keys to move the cursor, you can redefine the extents
  5001.     or size of the field. When you choose "Size" on the Field menu or press
  5002.     (ALT+V), the cursor is placed on the lower right corner of the field.
  5003.     You adjust the size by using the arrow keys in the same way as you did
  5004.     when you created the field. You can always cancel a resize operation by
  5005.     pressing the (Esc) key. As usual, press (Enter) to accept the new size.
  5006.  
  5007.          The resizing operation obeys Insert and Wrap modes accordingly.
  5008.     This means that when you make a single line field longer or shorter, the
  5009.     text or other fields following this field on the page, will be moved
  5010.     over and wrapped down or up just as if you were inserting characters.
  5011.  
  5012.          When you resize multiple line fields, you must first make sure that
  5013.     Typeover is set. And, if you are enlarging the field, you should see
  5014.  
  5015.                           Copyright (c) 1993 Piaf, Inc.
  5016.  
  5017.     Surefire S2.0 User's Guide                                       Page 86
  5018.  
  5019.     that there are no other fields to the right or below that will be
  5020.     covered by the larger field. It is a good idea to first insert extra
  5021.     lines below a multiple line field that you wish to make larger.
  5022.  
  5023.          Note:   You may not delete a field by sizing it smaller than 1
  5024.     character. Read the section below for information on how to delete
  5025.     fields that are no longer needed or desired.
  5026.  
  5027.     Deleting Fields
  5028.  
  5029.          Fields can be deleted along with text that has been Line or Block
  5030.     selected.  You do this by choosing "Delete" on the Edit menu.  The
  5031.     currently selected field or current field can be deleted directly by
  5032.     choosing "Delete" on the Edit menu. Notice that the Delete choice does
  5033.     not have a shortcut. This is a precaution. If you delete a page, by
  5034.     choosing "Delete Page" from the Page menu, all the fields as well as the
  5035.     text on that page will be deleted.
  5036.  
  5037.          Because Surefire does not want you to lose important data, you will
  5038.     be warned if you try to delete a database field. In addition, you will
  5039.     not be able to delete a field by deleting the current line or end of
  5040.     line with (Ctrl+D) or (Ctrl+E) respectively.
  5041.  
  5042.          If you delete all of the fields in a document, Surefire will
  5043.     automatically return you to Text edit mode. You will note that the "Use
  5044.     Alt+F7" and "Document Alt+F9" choices on the Operate menu are disabled.
  5045.     When you again add fields to the document, these choices will become
  5046.     available once more.
  5047.  
  5048.     Editing a Document with Fields as Text
  5049.  
  5050.          The choice "Text  Alt+F8" on the Operate menu allows you to edit
  5051.     the document as if it were nothing but text. This means that the values
  5052.     currently displayed in the fields, become simply text on the document's
  5053.     pages. Once changes are made to a document during Text edit, the
  5054.     placement and characteristics of the fields are no longer maintained.
  5055.     You can no longer edit the document as a document or use the document to
  5056.     manipulate field values unless you Get the saved version of the
  5057.     document.
  5058.  
  5059.          Editing a document as text is useful to make annotations or add
  5060.     specific wording or emphasis for one-time usage.  You can then print the
  5061.     document or save it as a Report  without altering the general make-up of
  5062.     your original document. See "Chapter 22: Generating Reports" for
  5063.     information on how to save documents as reports.
  5064.  
  5065.     Moving and Copying Fields
  5066.  
  5067.          You can move and copy (duplicate) fields that are interspersed with
  5068.     text by using Cut & Paste just as you would with text alone. The only
  5069.     difference is that the selection of the mixed text and fields must fully
  5070.     contain the fields.  In other words, you cannot try to select part of a
  5071.     field.  If you do, a message will let you know that the operation cannot
  5072.     be done.
  5073.  
  5074.                           Copyright (c) 1993 Piaf, Inc.
  5075.  
  5076.     Surefire S2.0 User's Guide                                       Page 87
  5077.  
  5078.          Fields that are cut or copied will be put in a clipboard object
  5079.     along with any text that was also selected. The contents of the
  5080.     clipboard object can be pasted elsewhere in the document or even into
  5081.     another document.
  5082.  
  5083.          If you are in document edit and choose Cut or Copy from the Edit
  5084.     menu without doing a selection first, the current field will be cut or
  5085.     copied. You use the Cut operation to move fields and the Copy operation
  5086.     to copy them.
  5087.  
  5088.          When fields are cut, the fields contained in the cut will still
  5089.     retain their unique identifiers, all attributes and associated field
  5090.     commands.  Later, when you paste the clipboard object, the fields in the
  5091.     new location will be exactly as they were before.   This means that the
  5092.     fields were moved with everything else intact.  If, however, you use a
  5093.     paste & keep operation instead, the initial paste will work as a move
  5094.     but any secondary paste operations will cause new similar fields to be
  5095.     created with new IDs. These new fields will not retain any field
  5096.     commands that were associated with the original field.
  5097.  
  5098.          When fields are copied, the fields in the clipboard object will
  5099.     retain their format attributes but not their unique identifiers, values
  5100.     or field commands. A Paste or Paste & Keep operation will cause new
  5101.     fields to be created with new IDs. If any of the original fields had a
  5102.     data attribute set to Stored,  the new duplicate fields would have their
  5103.     data attributes set back to be Not Stored.
  5104.  
  5105.          When you Paste or Paste & Keep fields between documents, the fields
  5106.     will retain their format attributes but not their unique identifiers,
  5107.     data attributes or their associated commands.  This is because the
  5108.     command references and data storage specifications can no longer be
  5109.     valid in the other document.
  5110.  
  5111.     Entering Information into Fields
  5112.  
  5113.          When documents are not being edited, they can be Used.  This allows
  5114.     you to use the document so that only the information within fields (its
  5115.     values) can be changed or manipulated. Fields provide a way to enter
  5116.     information in an easy and rapid manner. As discussed in the previous
  5117.     chapter, the way in which you enter information into fields depends on
  5118.     the type of field and the field's specified formatting attributes.
  5119.  
  5120.          You could use a document as a pre-made form, as a spreadsheet to
  5121.     perform calculations or as a way to enter or view information in a
  5122.     database. Using a document is what really distinguishes a Smart Document
  5123.     from an ordinary document.
  5124.  
  5125.           During Use mode, even though you can put the cursor anywhere in
  5126.     the document, you can only enter information into a field.  Attempting
  5127.     to type anywhere else will result in nothing happening.  The cursor must
  5128.     first be positioned on a field.  You can use a free cursor or a cursor
  5129.     that is tied to fields to position your cursor.
  5130.  
  5131.  
  5132.  
  5133.                           Copyright (c) 1993 Piaf, Inc.
  5134.  
  5135.     Surefire S2.0 User's Guide                                       Page 88
  5136.  
  5137.          If the current field or cell contains a field command, a '#' will
  5138.     be displayed at the far right of the status line. This let's you know
  5139.     quickly that the current field or cell has a command. Any value you
  5140.     enter in the cell will most likely be overwritten when that field
  5141.     command is executed. Just bypass the field and move on to another one.
  5142.  
  5143.        Entering Dates
  5144.  
  5145.          In order that you do not have to type every character of a date,
  5146.     you follow simple rules for entering values in date fields of each of
  5147.     the three date formats. In addition, today's date can always be
  5148.     specified by simply typing the letter 't' or 'T' when the cursor is in
  5149.     a date field. Date fields always assure that the dates contained within
  5150.     them are valid dates.  That is, only 12 months can be represented and
  5151.     the appropriate valid days for a month can be represented.  Of course,
  5152.     you can only specify February 29th for leap years.
  5153.  
  5154.          When you enter values into a date field, use the (left and right
  5155.     arrow) keys to move between the month, day and year parts of the date.
  5156.     With the first two formats you will be able to enter dates that are in
  5157.     the current century, that is between Jan 1, 1900 and Dec 31, 1999. The
  5158.     last format allows entry and display of dates that are from January 1,
  5159.     0001 through December 31, 9999.
  5160.  
  5161.          The rules for each of the formats are as follows:
  5162.  
  5163.          Date Style     Description
  5164.  
  5165.          mm/dd/yy       This format allows you to enter the month, day and
  5166.                         year by the 2 digit number that represents it.
  5167.                         Type the month number when the cursor is over the
  5168.                         mm part, the day number when the cursor is over dd
  5169.                         and the last two digits of the year when the cursor
  5170.                         is over yy.
  5171.  
  5172.          dd-mmm-yy      This format specifies the day first as a two digit
  5173.                         number, then the month as the three letter abbrev
  5174.                         and finally the last two digits of the year.  The
  5175.                         day and year are entered by typing the appropriate
  5176.                         number when the cursor is over the dd or yy part.
  5177.  
  5178.                         The month is specified by typing in the first
  5179.                         character of the month name. If the cursor is in
  5180.                         the month part of the field and you type the letter
  5181.                         's', the month will become 'sep' If you type the
  5182.                         letter 'j' you will get 'jan'; to get 'jun' type
  5183.                         'j' again; type 'j' one more time to get 'jul'.
  5184.  
  5185.  
  5186.  
  5187.  
  5188.  
  5189.  
  5190.  
  5191.  
  5192.                           Copyright (c) 1993 Piaf, Inc.
  5193.  
  5194.     Surefire S2.0 User's Guide                                       Page 89
  5195.  
  5196.          Month dd, yyyy This format completely spells out the name of the
  5197.                         month followed by the day and then the year. You
  5198.                         type in a two digit day and then you can type in a
  5199.                         four digit year.
  5200.  
  5201.                         The month is specified by typing in the first
  5202.                         character of the month name. The remaining
  5203.                         characters are filled in automatically. If the
  5204.                         cursor is at the start of the field and you type
  5205.                         the letter 'n', the month will become 'November'.
  5206.                         If you type the letter 'A' you will get 'April'; to
  5207.                         get  'August', type 'A' one more time.
  5208.  
  5209.     Pop-Lists
  5210.  
  5211.          Any single line text field can have a pop-list associated with it.
  5212.     This pop-list contains pre-set values for the text field and can be
  5213.     used, created or edited at any time while you are using  the document.
  5214.     Pop-lists are useful for storing pre-set text strings that are used
  5215.     often for a particular text field. You will avoid unnecessary
  5216.     keystrokes, you won't make as many spelling mistakes, and you will be
  5217.     certain of using only one version among similar values.  For example, a
  5218.     pop-list for a field with people's titles might include: President,
  5219.     Secretary, Administrator, His Royal Highness, etc.
  5220.  
  5221.          If the current field is a text field with a pop-list, a 'P' will be
  5222.     displayed in the upper right corner of your screen. This lets you know
  5223.     that there are available selections before you start typing a value.
  5224.  
  5225.        Creating a Pop-list
  5226.  
  5227.          To create a pop-list, position the cursor on the text field and
  5228.     press (Ctrl+Z).  A window is opened in the center of the screen. You may
  5229.     add or change as many items as you wish using the same editing commands
  5230.     you are already familiar with. Just type each value that you want on a
  5231.     line of its own and press (Enter) to move down to the next line. Up to
  5232.     30 items can be put in a pop-list. When you are finished, press (Esc).
  5233.     You can then define or change pop-lists for any other single line text
  5234.     fields in your document.  The pop-lists you create are immediately
  5235.     available but you must save the document if you want the pop-lists to be
  5236.     retained for subsequent sessions.
  5237.  
  5238.        Using a Pop-list
  5239.  
  5240.          To use a pop-list, you zoom it like any other zoomable item in
  5241.     Surefire.  With the cursor positioned on the text field, press (Alt+Z)
  5242.     to display the pop-list. Then, you can move around with the (up and down
  5243.     arrow) keys or (Page Up) and (Page Down), until the item that you wish
  5244.     is highlighted. Choose this item with the (Enter) key.  When you choose
  5245.     an item, that text will be copied into the current text field and the
  5246.     pop-list will be closed.  You can leave the pop-list without selecting
  5247.     anything by using the (Esc) key.
  5248.  
  5249.  
  5250.  
  5251.                           Copyright (c) 1993 Piaf, Inc.
  5252.  
  5253.     Surefire S2.0 User's Guide                                       Page 90
  5254.  
  5255.     Clearing Field Values
  5256.  
  5257.          You can clear the values in individual fields or all fields in the
  5258.     document at one time. An individual field is cleared by pressing (Ctrl
  5259.     + K) when that field is the current field.  You can clear all fields in
  5260.     the document by choosing "Clear Fields " from the Field menu or pressing
  5261.     (ALT+Y).
  5262.  
  5263.  
  5264.     Locating Specific Field Values
  5265.  
  5266.          Because of Surefire's unique design there is no special mechanism
  5267.     for finding specific field values in your document. When you are using
  5268.     the document, you can select "Find... " from the Page menu or press
  5269.     (ALT+T) to open the Find window. This is exactly how you use Find
  5270.     without fields. You can type in a pattern and choose NEXT or PREVIOUS to
  5271.     search forward or backward in the document for that value.
  5272.  
  5273.          Surefire will locate matching patterns anywhere in the document ,
  5274.     whether or not it occurs in a field.  You can use this feature to search
  5275.     for and change incorrect field values by skipping matches that do not
  5276.     occur in a field.
  5277.  
  5278.  
  5279.     Printing a Document with Fields
  5280.  
  5281.          There are three ways that you might want to print a document with
  5282.     fields.  Each of these results follow naturally from the way you are
  5283.     looking at your document on the screen.
  5284.  
  5285.          1) You can have your form look the way it does on the screen when
  5286.     you fill it out, with underlines defining each field. If you wanted to
  5287.     print out a "blank" form to be filled in by pencil, you can clear all
  5288.     fields by choosing "Clear Fields" on the Field menu before you print.
  5289.  
  5290.          2) You can see the definition of your form with text surrounding
  5291.     field placeholders.
  5292.  
  5293.          3) You can see the field values, auto-sized as needed, without
  5294.     underlines.  Notice on the first line that the excess space between
  5295.     "Alice Fay Jones" and "of" has been removed. This happened because
  5296.     autosizing was set for the text field containing "Alice Fay Jones".
  5297.  
  5298.          To print your document the first way, make sure you are in Use
  5299.     mode before printing. To achieve the second type of output, print while
  5300.     you are in Document edit mode and finally the third result will occur
  5301.     while you are viewing your document in Text edit mode.  In all three
  5302.     cases, you print the same way as you would for documents without fields.
  5303.     You choose Print from the File menu, change any options in the Print
  5304.     window and choose OK.
  5305.  
  5306.  
  5307.  
  5308.  
  5309.  
  5310.                           Copyright (c) 1993 Piaf, Inc.
  5311.  
  5312.     Surefire S2.0 User's Guide                                       Page 91
  5313.  
  5314.     Copying and Pasting Values Among Fields
  5315.  
  5316.          While using the document, you can Cut or Copy field values and
  5317.     Paste these values into other fields in the same or a different
  5318.     document. For example, you may have a large block of text in a field
  5319.     that you want echoed in another field. You really don't want to retype
  5320.     the text word for word. To copy the value, move the cursor to the field
  5321.     and press (ALT+F2) to put the value in a clipboard object. Then, move
  5322.     the cursor to the field that will get the value and press (ALT+F3) to
  5323.     paste the value.
  5324.  
  5325.          You may also Cut the original value if you no longer want it in the
  5326.     original field. And, of course you may Paste & Keep the clipboard object
  5327.     if you want the value copied to more than one field.
  5328.  
  5329.          Note: When you paste text into a multiple line text field the text
  5330.     will be pasted into all lines of the field starting at the first line no
  5331.     matter which line of the field the cursor is on.
  5332.  
  5333.     Copying and Pasting Values To the Calculator
  5334.  
  5335.          If the current field is a numeric field, you can place the value of
  5336.     the current cell in that field directly into the entry line of the
  5337.     Calculator.  To do this just type (Ctrl + Enter) when the Calculator is
  5338.     visible. The same value that was displayed in the numeric cell is
  5339.     inserted into the entry line of the Calculator just as if it were typed.
  5340.  
  5341.          Likewise, the resulting value of a calculation can be put directly
  5342.     into your document by choosing the PASTE button. The value will be
  5343.     pasted differently depending on whether you are currently using or
  5344.     editing the document. Choosing PASTE closes the Calculator window.
  5345.  
  5346.          If you are using the document and the current document field is a
  5347.     numeric field,  choosing PASTE will put the current value from the
  5348.     result area of the Calculator into the current cell of the numeric
  5349.     field.
  5350.  
  5351.          If, however, you are currently working in Document edit  or Text
  5352.     edit mode, the result is put onto the page at the location where the
  5353.     cursor was when you opened the Calculator. The value is inserted or
  5354.     overtyped depending on the current Typeover status.  If you are editing
  5355.     the document, you will not be able to paste a value on top of a field.
  5356.     If Word Wrap is on, normal wrapping will occur.
  5357.  
  5358.     Using the Mouse with Document Fields
  5359.  
  5360.          Generally you interact with the fields in Surefire documents in the
  5361.     same manner that you interact with fields in Surefire system windows. But
  5362.     there are some differences which are noted in the following paragraphs.
  5363.  
  5364.        Toggling Logical Fields
  5365.  
  5366.          To change the value of a logical field, Click on that field.
  5367.  
  5368.  
  5369.                           Copyright (c) 1993 Piaf, Inc.
  5370.  
  5371.     Surefire S2.0 User's Guide                                       Page 92
  5372.  
  5373.        Selecting a Field
  5374.  
  5375.          To select a Text, Numeric or Date field, Click on that field. You can
  5376.     now type text in the field or perform an
  5377.     operation on that field. When using the document, these
  5378.     operations include editing the field's command and copying the field's value
  5379.     to the Clipboard. If you are editing the document, these operations include
  5380.     cutting the field to the Clipboard, resizing the field or changing the
  5381.     field's attributes.
  5382.  
  5383.          If you are using the document, you may move the cursor as desired
  5384.     within the field before typing text. When you select a new field, the value
  5385.     in the previous field is entered and
  5386.     verified. If for some reason, the value is not valid for that field, you
  5387.     will hear a beep and the previous field will remain highlighted waiting for
  5388.     your correction.
  5389.  
  5390.        Selecting a Button
  5391.  
  5392.          When you use a document, a Click on a button will cause the command
  5393.     associated with that button to be executed.
  5394.  
  5395.        Text Field Pop-lists
  5396.  
  5397.          You may choose a value from a text field pop-list in a way very
  5398.     similar to choosing a value from a system window multiple choice button.
  5399.     First Click on the text field to select it. Now Hold the left mouse
  5400.     button. This will zoom the pop-list like pressing (ALT+Z). Drag the
  5401.     mouse over the choices that appear.  Release the mouse over the desired
  5402.     choice to put that value in the field.
  5403.  
  5404.          If you prefer not to make any choice, Move the mouse off of the
  5405.     pop-list and Release. Now, Press the right mouse to cancel the operation.
  5406.  
  5407.          To add or change values in a pop-list, select the field and press
  5408.     (Ctrl+Z), then follow the procdedure described earlier in this chapter.
  5409.     Don't forget to save your document if you want to keep these new pop-list
  5410.     entries for later use.
  5411.  
  5412.        Scrolling a Pop-list
  5413.  
  5414.       If there are too many choices in the pop-list to display at one time,
  5415.     you may scroll it with the mouse.  Hold the left mouse button while the
  5416.     mouse cursor is positioned on the up arrow seen on the top border or the
  5417.     down arrow seen on the bottom border of the pop-list. No arrows are
  5418.     displayed if all of the items are visible.
  5419.  
  5420.  
  5421.  
  5422.  
  5423.  
  5424.  
  5425.  
  5426.  
  5427.  
  5428.                           Copyright (c) 1993 Piaf, Inc.
  5429.  
  5430.     Surefire S2.0 User's Guide                                       Page 93
  5431.  
  5432.        Creating Text and Numeric Fields
  5433.  
  5434.          You may use the mouse to define the size of a new text or numeric field
  5435.     interactively. First, Click at the desired position for a new field. Then
  5436.     open the Field Create Window by choosing Create from the Field menu. Here,
  5437.     set the field type multiple choice button to Text or Numeric and define the
  5438.     field attributes that you want. Finally choose OK. The Field Create window
  5439.     is fully explained in Chapter 12 of the Surefire User's Guide. Note that if
  5440.     there are already fields in the document, you must be editing the document
  5441.     in order to create fields.
  5442.  
  5443.          After choosing OK from the Field Create window, the mouse cursor will
  5444.     be placed at the position you had indicated for the first character of the
  5445.     field. Now, Press the left mouse button and Drag the mouse until the extent
  5446.     of the field is defined. When satisfied with the size of the new field,
  5447.     Release the mouse button.
  5448.  
  5449.          If you want to cancel the field creation while you are sizing the
  5450.     field, you can Drag the mouse above or to the left of the first character of
  5451.     the field.
  5452.  
  5453.        Resizing Text and Numeric Fields
  5454.  
  5455.          You may use the mouse to change the size of a text or numeric field
  5456.     interactively when you are editing the document. First, Click on an
  5457.     existing field that you want to resize.  Now, choose "Size" from the
  5458.     Field menu. The mouse cursor will be positioned at the rightmost character
  5459.     or lower right corner of the field. If the field is a multiple line field,
  5460.     Surefire will automatically switch into Typeover mode. You may cancel the
  5461.     resize operation at this time by Clicking the right mouse button.
  5462.  
  5463.          You may Drag the mouse until the new extent of the field is defined.
  5464.     When you are satisfied with the new size, Release the left mouse button.
  5465.     You will not be able to Drag the mouse above or to the left of the first
  5466.     character of the field. added more cells to your field.
  5467.  
  5468.     Rapid Fire Editing with Keys and Mouse
  5469.  
  5470.          You will quickly discover that by using a combination of Shortcut
  5471.     keys and the mouse some very fast operations are possible. For example,
  5472.     here is a way to resize a lot of fields. Click the mouse on a field,
  5473.     press (ALT+V) with the other hand and now resize the field with the mouse.
  5474.     As you become more familiar with Surefire, you will find many combinations
  5475.     of mouse and key operations that make operations faster.
  5476.  
  5477.  
  5478.  
  5479.  
  5480.  
  5481.  
  5482.  
  5483.  
  5484.  
  5485.  
  5486.  
  5487.                           Copyright (c) 1993 Piaf, Inc.
  5488.  
  5489.     Surefire S2.0 User's Guide                                       Page 94
  5490.  
  5491.     Chapter 14     -    Introducing Field Commands
  5492.  
  5493.          As you've seen in the previous chapters, fields by themselves are
  5494.     very useful in constructing and entering data in forms such as time
  5495.     cards, property leases, orders and other standard contracts.  But
  5496.     you need to enter a value in each field or cell. With field commands,
  5497.     some field entries could be automatically determined from information
  5498.     you already entered in other parts of the document.  You could even
  5499.     access an often used form letter or search for a specific type of
  5500.     information by the push of a button.  With field commands you can create
  5501.     the most intelligent Smart documents that can even become entire
  5502.     applications.
  5503.  
  5504.  
  5505.     What is a Field Command?
  5506.  
  5507.          A field command consists of one or more lines of text connected to
  5508.     a field or cell. This text tells Surefire specifically what to do.
  5509.     Generally, this is an action or calculation which occurs when the
  5510.     command is executed.  Most of the time, commands are executed after
  5511.     information has changed in one or more fields.
  5512.  
  5513.          The lines of text that make up a field command contain expressions
  5514.     and functions that are appropriate for the type of field that contains
  5515.     the command. You have already seen expressions and functions in the
  5516.     Calculator. While in the Calculator you can only have mathematical
  5517.     expressions and functions, field commands are much more varied.
  5518.  
  5519.          For a numeric field, a mathematical expression is the simplest form
  5520.     of field command.  For example, "2 + 2" can be defined as a command in
  5521.     a numeric field.  When the command is executed, the result "4" is
  5522.     displayed in that field.  This is very similar to the operation of
  5523.     expressions in the Calculator. In fact, any numeric expression or
  5524.     function that can be used by the Calculator, can also be a numeric field
  5525.     command.
  5526.  
  5527.          For other types of fields, there are additional functions and
  5528.     operators that allow you to manipulate the data values  or information
  5529.     contained in those fields.  For instance, a date field function allows
  5530.     you to calculate a date that is 15 days from today; a text field
  5531.     operator allows two text strings to be combined together to produce a
  5532.     third. Operators available for each field type will be described in the
  5533.     next chapter.
  5534.  
  5535.          In this chapter you will learn the basics of using field commands.
  5536.  
  5537.  
  5538.  
  5539.  
  5540.  
  5541.  
  5542.  
  5543.  
  5544.  
  5545.  
  5546.                           Copyright (c) 1993 Piaf, Inc.
  5547.  
  5548.     Surefire S2.0 User's Guide                                       Page 95
  5549.  
  5550.     What Can Be Done with Field Commands?
  5551.  
  5552.          Your document can accomplish much more with field commands than
  5553.     simple addition. Extensive capabilities involving numbers and
  5554.     mathematical functions are available.  In addition to numbers, one can
  5555.     also manipulate dates and text. Determining a date so many days before
  5556.     or after today is an example of a date expression.  The result of a date
  5557.     expression is displayed in a date field in the format that you have
  5558.     chose for that field. As for text, you can use field commands to
  5559.     substitute a portion of one string of text with another, change case,
  5560.     combine strings to form a new string and various other text
  5561.     manipulations.
  5562.  
  5563.          Commands can also be used to control what happens.  This is done
  5564.     using conditions and control functions. An example of a simple condition
  5565.     is to display "Balance Overdue" if today is after the due date for Joe
  5566.     Smith's monthly loan payment. Conditions are often used with logical
  5567.     fields.  Control functions can cause something to happen when a button
  5568.     is "pushed", or when a specific value is entered into some field. This
  5569.     might be the display of another document, searching a data base or even
  5570.     running a DOS command or another application. Control functions are
  5571.     generally used with button fields.
  5572.  
  5573.          A complete description of field commands and examples of how they
  5574.     can be used, can be found in Appendix A.
  5575.  
  5576.     Field IDs
  5577.  
  5578.          A field ID is automatically assigned by Surefire when a field is
  5579.     created and is guaranteed to be unique for the document. This ID is used
  5580.     in commands to reference or represent each individual cell in a
  5581.     document. Single line fields have only one cell whereas a multiple line
  5582.     field has one cell per line. Since only text and numeric fields can be
  5583.     multi-lined, only text and numeric fields can have more than one cell.
  5584.  
  5585.          IDs consist of one or two capital letters optionally followed by
  5586.     one or two digits.  The letters describe a field uniquely while the
  5587.     numbers identify the line or cell within the field.
  5588.  
  5589.          Examples of IDs:
  5590.  
  5591.          L                        B3
  5592.          AA1                      Q11
  5593.  
  5594.     Specifying Commands
  5595.  
  5596.          You specify field commands using the Command Edit window which is
  5597.     displayed by selecting "Commands " on the Field menu or by pressing
  5598.     (ALT+F10). This window is actually a pane that appears at the top of you
  5599.     screen so that your document is not obscured. Among other things, this
  5600.     window allows you to enter the actual command, view commands that
  5601.     already exist in fields, and copy similar existing commands to other
  5602.     fields. You can also give a field a more memorable name if desired.
  5603.  
  5604.  
  5605.                           Copyright (c) 1993 Piaf, Inc.
  5606.  
  5607.     Surefire S2.0 User's Guide                                       Page 96
  5608.  
  5609.          In the Command Edit window there is a label called "ID:".  To the
  5610.     right of this label is the field ID of the current field cell.  This is
  5611.     the unique identifier assigned by Surefire when the field was created or
  5612.     enlarged. The command contained by the current cell is shown next to the
  5613.     label "Cmd:".  You can edit field commands on the two lines labeled as
  5614.     "Edit:".  This is called the edit area.
  5615.  
  5616.        Entering Field Commands
  5617.  
  5618.          You can enter a field command by typing the command into the edit
  5619.     area. Once the command is in the edit area, you put it in the current
  5620.     field or cell (whose ID is shown) by using a paste or paste & keep
  5621.     operation.  These are the same paste operations that you learned in
  5622.     word-processing. Paste will put the command into the cell and clear the
  5623.     edit area while paste & keep will put the command into the cell but will
  5624.     not clear the edit area. Generally, paste & keep is used to put the same
  5625.     or similar commands into other fields. You will learn more sophisticated
  5626.     methods for entering and manipulating commands in the next chapter.
  5627.  
  5628.          Except for numeric fields, there can only be one field command per
  5629.     field. Each cell of a multiple line numeric field, however, may have its
  5630.     own field command.
  5631.  
  5632.        Executing Field Commands
  5633.  
  5634.          When a command is executed, it does what it was specified to do. If
  5635.     it is to add two numbers, then the numbers are added and the result is
  5636.     displayed in the numeric field containing that command. If, however, the
  5637.     command had a function to go to another page, execution would mean that
  5638.     Surefire would scroll the document to the specified page. Execution of
  5639.     a command can also mean putting the value of one cell or the result of
  5640.     some function into another cell in the document.
  5641.  
  5642.          There are various ways in which a command can be executed.  The
  5643.     best way depends on the type of command and the size of the document.
  5644.     Commands can be executed individually or, all commands on a page or the
  5645.     entire document can be executed at the same time.  Each of the methods
  5646.     of command execution will be discussed in the next chapter.
  5647.  
  5648.          If a command was specified incorrectly, Surefire will not know what
  5649.     you want it to do so it will fill the field with E's to indicate an
  5650.     error.  The E's go away if the field is cleared or the command is
  5651.     corrected and re-executed.
  5652.  
  5653.  
  5654.     Specifying Functions
  5655.  
  5656.          Functions allow you to perform more sophisticated operations on
  5657.     field values than you can with operators alone. All functions in
  5658.     Surefire start with the special character "@". If a function uses
  5659.     arguments, these arguments are specified within parentheses and each is
  5660.     separated by a comma. Arguments supply the data or information needed by
  5661.     the function to do its job. The function @SQRT(n) requires one argument
  5662.     while the function @SUBSTR(text, start, len) requires three.
  5663.  
  5664.                           Copyright (c) 1993 Piaf, Inc.
  5665.  
  5666.     Surefire S2.0 User's Guide                                       Page 97
  5667.  
  5668.          To see which functions are available for building your commands you
  5669.     can display a pop-list of functions while the cursor is in the edit area
  5670.     of the Command Edit window. This is similar to the way you can list
  5671.     functions in the Calculator except here the functions are not just
  5672.     numeric functions. Type (ALT+Z) to display a pop-list of all available
  5673.     functions with placeholders for their arguments. You may scroll through
  5674.     this list to find the one you want. Typing (Enter) will cause the
  5675.     highlighted function to be put into the edit area starting where the
  5676.     cursor was when you typed (ALT+Z). You can then replace the dummy
  5677.     arguments with the right values or field IDs and continue.
  5678.  
  5679.          All functions available in Surefire are described in "Appendix A:
  5680.     Surefire Function Reference".
  5681.  
  5682.  
  5683.  
  5684.  
  5685.  
  5686.  
  5687.  
  5688.  
  5689.  
  5690.  
  5691.  
  5692.  
  5693.  
  5694.  
  5695.  
  5696.  
  5697.  
  5698.  
  5699.  
  5700.  
  5701.  
  5702.  
  5703.  
  5704.  
  5705.  
  5706.  
  5707.  
  5708.  
  5709.  
  5710.  
  5711.  
  5712.  
  5713.  
  5714.  
  5715.  
  5716.  
  5717.  
  5718.  
  5719.  
  5720.  
  5721.  
  5722.  
  5723.                           Copyright (c) 1993 Piaf, Inc.
  5724.  
  5725.     Surefire S2.0 User's Guide                                       Page 98
  5726.  
  5727.     Chapter 15     -    Using Field Commands
  5728.  
  5729.          We introduced you to field commands in the previous chapter. In
  5730.     this chapter you will learn and practice more sophisticated concepts
  5731.     involving commands. These include viewing and editing existing commands,
  5732.     and formulating specific types of commands to do different tasks. Below
  5733.     is a list of topics that are covered.
  5734.  
  5735.                    Viewing and Editing Commands
  5736.                    IDs and References
  5737.                    Tracing References
  5738.                    Assignment Statements
  5739.                    Multiple Statements
  5740.                    Field Operations
  5741.                    Control Operations
  5742.                    More About Command Execution
  5743.  
  5744.  
  5745.     Viewing and Editing Commands
  5746.  
  5747.          You may view and edit field commands using the Command Edit window.
  5748.     As you saw in the previous chapter, this window is displayed by
  5749.     selecting "Commands.. " on the Field menu or by pressing (ALT+F10).
  5750.     Among other things, this window allows you to enter the actual command,
  5751.     view commands that already exist in fields, and copy similar existing
  5752.     commands to other fields. You can also give a field a more memorable
  5753.     name if desired.
  5754.  
  5755.          As you may recall, if a '#' is displayed at the far right of the
  5756.     status line, the current field or cell contains a command. This lets you
  5757.     know if a command exists without the Command Edit window being open.
  5758.     This is often very handy.
  5759.  
  5760.        IDs and Names
  5761.  
  5762.          Any cell in your document can optionally be named. When you give a
  5763.     cell a name, this name can be used instead of its pre-assigned ID.
  5764.     Giving a name improves the readability of expressions and database
  5765.     queries.  For example, if A1 represented number of hours worked and B2
  5766.     represented the hourly pay rate, the expression  "A1 * B2" may now read
  5767.     as "hours * rate" after you name the cells A1 and B2.
  5768.  
  5769.          Note:   A multiple line text field may have only one name for the
  5770.     entire field.
  5771.  
  5772.          You specify a field name by typing it in next to the label "Name:"
  5773.     in the Command Edit window. Surefire ensures that names are also unique
  5774.     within a single document.  Names must begin with 3 lower case letters
  5775.     optionally followed by letters, numbers or an underscore (_).
  5776.          Examples of Names
  5777.          salary
  5778.          phoneline1
  5779.          lease_date
  5780.  
  5781.  
  5782.                           Copyright (c) 1993 Piaf, Inc.
  5783.  
  5784.     Surefire S2.0 User's Guide                                       Page 99
  5785.  
  5786.        Viewing Field Commands
  5787.  
  5788.          Through the Command Edit window you can view every cell's command.
  5789.     To do this you move to the document while the Command Edit window is
  5790.     open. Once here, you may move around the document as usual, using the
  5791.     cursor movement keys. While the cursor is in the document, moving from
  5792.     cell to cell will cause the field ID and field command information in
  5793.     the Command Edit window to reflect the current cell. You may move the
  5794.     cursor to the document and back to the Command Edit window by pressing
  5795.     (Shift + Tab).
  5796.  
  5797.        Editing Field Commands
  5798.  
  5799.          In the Command Edit window, the command contained by the current
  5800.     cell is shown next to the label "Cmd:".  You can edit field commands in
  5801.     the edit area which is to right of the two lines labeled "Edit:".
  5802.  
  5803.          To edit a command that is already in a cell, you use the Cut and
  5804.     Copy operations that you became familiar with in the Word Processing
  5805.     chapters. When the cursor is in the edit area, Cut (ALT+F1) will remove
  5806.     the command from the current cell and place it in the edit area.  Copy
  5807.     (ALT+F2) will put a copy of the command into the edit area.
  5808.  
  5809.          Once the command is in the edit area, you may change it by using
  5810.     any of the text editing operations with which you are already familiar.
  5811.     Afterwards, you can put the command back in the cell by using a Paste or
  5812.     Paste & Keep operation.  Paste (ALT+F3) will put the command into the
  5813.     cell and clear the edit area while Paste & Keep (ALT+F4) will put the
  5814.     command into the cell but will not clear the edit area. You can use
  5815.     Paste & Keep to put the same or similar commands into other fields.
  5816.  
  5817.          More than two lines are available for commands, however.  If more
  5818.     room is needed, you can scroll the edit area.  Up to ten lines can be
  5819.     used for field commands. When there is more text in the edit area than
  5820.     you can see, an arrow on the edit area's right side indicates the
  5821.     direction in which there is more text. You can use the arrow keys to
  5822.     access up to a full ten lines for more complex command statements.
  5823.  
  5824.          Say a cell has a rather complex command that actually takes four
  5825.     lines. Initially, the first line is next to the Cmd: label.  The
  5826.     right-pointing arrow at the far right of this line indicates that there
  5827.     is more to the command than you can see. If you copy the command from
  5828.     the cell to the edit area and press (down arrow) to scroll down one
  5829.     line, the edit area will display lines 2 and 3 of the command. The up
  5830.     and down arrows at the far right of the edit area indicate that there is
  5831.     more of the command both before and after the two lines that can be seen
  5832.     in the edit area. You can use the (up and down arrow) keys to scroll the
  5833.     text in the edit area and access all of the command.
  5834.  
  5835.  
  5836.  
  5837.  
  5838.  
  5839.  
  5840.  
  5841.                           Copyright (c) 1993 Piaf, Inc.
  5842.  
  5843.     Surefire S2.0 User's Guide                                       Page 100
  5844.  
  5845.          The command in the edit area of the Command Edit window can also be
  5846.     edited when the cursor is in the document. When the Command Edit window
  5847.     is open and the cursor has been moved to the document by pressing
  5848.     (Shift+Tab), you can move through the document without altering either
  5849.     the document or field values.
  5850.  
  5851.          The characters that you type at the keyboard will be put directly
  5852.     into the command edit area.  As you move around in the document, you can
  5853.     "point" to cells that you want in your expression in order to obtain
  5854.     their IDs. That is, you can enter the ID of a cell by pressing
  5855.     (Ctrl+Enter) when the cursor is on that cell. This is especially useful
  5856.     for building expressions based on fields in the document whose IDs you
  5857.     do not know.
  5858.  
  5859.     Pasting Values From the Calculator
  5860.  
  5861.          If you display the Calculator while the Command Edit window is
  5862.     opened, you may enter the result of your calculation directly into the
  5863.     edit area.  Just use the Calculator as described in Chapter 10. When the
  5864.     result you desire is in the result area of the Calculator, choose PASTE.
  5865.     The value will be entered into the edit area of the Command Edit window
  5866.     at the current cursor location.
  5867.  
  5868.  
  5869.     IDs and References
  5870.  
  5871.          As you recall, a field ID is automatically assigned by Surefire
  5872.     when a field is created and is guaranteed to be unique for the document.
  5873.     This ID is used in commands to reference or represent each individual
  5874.     cell in a document.  IDs consist of one or two capital letters
  5875.     optionally followed by one or two digits.  The letters describe a field
  5876.     uniquely while the numbers identify the line or cell within the field.
  5877.  
  5878.          A simple use of referencing is to take the value in one cell and
  5879.     display it in another cell.  If the fields L and M are the same data
  5880.     types, the value in  L can be displayed in M by defining "L" as the
  5881.     command for M. When the field command in cell M is executed, whatever
  5882.     value is currently contained in L will be displayed in M.
  5883.  
  5884.          A field ID can also be used to reference an entire field whether it
  5885.     is a multiple or single line field.  This is done by using only the
  5886.     letter prefix of the ID.  Since date, and logical fields can only be
  5887.     single line or have one cell, the letter prefix, with or without the
  5888.     digit '1', can be used interchangeably. The digit part is usually
  5889.     dropped. For example, if a date field is C, then either C or C1 can
  5890.     reference the field. The same holds for single line text and numeric
  5891.     fields.
  5892.  
  5893.          There are different rules for referencing numeric versus text
  5894.     multiple line fields depending on what you want to happen.  In some
  5895.     cases you can use the complete field ID and in others you use the letter
  5896.     prefix only. These differences are described later in the sections on
  5897.     numeric and text fields.
  5898.  
  5899.  
  5900.                           Copyright (c) 1993 Piaf, Inc.
  5901.  
  5902.     Surefire S2.0 User's Guide                                       Page 101
  5903.  
  5904.        Ranges
  5905.  
  5906.          A range is a way of specifying a group of fields or cells. You
  5907.     specify a range by typing the ID's of two fields or cells with a colon
  5908.     (:) between them.  These two cells define a rectangle in which all cells
  5909.     that are completely contained within the rectangle make up the range of
  5910.     cells.  The first cell is the upper left corner and the second cell is
  5911.     the lower right corner of this rectangle. If multi-lined fields are used
  5912.     to define a range, you must specify the individual cells that bound the
  5913.     rectangle.
  5914.  
  5915.          Ranges can be used to copy commands or assign values to more than
  5916.     one field at a time or as a short-hand way to indicate a numeric sum.
  5917.  
  5918.          Range Example 1
  5919.  
  5920.          Say you have two 3-cell numeric fields called A and B that are side
  5921.          by side.
  5922.                              A1        B1
  5923.                              A2        B2
  5924.                              A3        B3
  5925.  
  5926.          The range A1:B3 contains all 6 cells. Because A and B are
  5927.          multi-lined fields, A:B is not a valid range.
  5928.  
  5929.          Range Example 2
  5930.  
  5931.          Say you have four single cell fields: Q, R, S, and T positioned
  5932.          like this:
  5933.                              Q         S
  5934.                              R         T
  5935.  
  5936.          Q:T represents the range of the four fields.
  5937.  
  5938.  
  5939.          Note:  All the cells of a range must be on the same page. That is,
  5940.     ranges cannot span pages.
  5941.  
  5942.  
  5943.        Numeric Fields
  5944.  
  5945.          You use the complete field ID to reference a specific cell of a
  5946.     numeric field. This is done by specifying the cell number as part of the
  5947.     ID.  For example, if we have a 3-cell numeric field called A, each cell
  5948.     is referred to as A1, A2 and A3.  When used in a command, each of these
  5949.     references correspond to the value contained in each cell of field A.
  5950.  
  5951.        Sum of Numbers
  5952.  
  5953.          For numeric fields you may use only the letter prefix  of a field
  5954.     ID by itself  to imply a sum of all the cells in that field.  This is
  5955.     convenient way to do the very common operation of summing groups of
  5956.     numbers.
  5957.  
  5958.  
  5959.                           Copyright (c) 1993 Piaf, Inc.
  5960.  
  5961.     Surefire S2.0 User's Guide                                       Page 102
  5962.  
  5963.          Shorthand Summation 1
  5964.  
  5965.          If field D contained the cells D1, D2, D3, D4, and we put just D as
  5966.          a field command for field B, B would display the sum of the numbers
  5967.          in D, or "D1 + D2 + D3 + D4".
  5968.  
  5969.          You can also use a reference to a range of numeric cells to
  5970.          indicate a sum.
  5971.  
  5972.          Shorthand Summation 2
  5973.  
  5974.          If there are two 3-cell numeric fields, A and B, side by side, the
  5975.          sum "A1 + A2 + B1 + B2" can be expressed as the range "A1:B2". The
  5976.          command A1:B2 can be put into field C to display the sum.
  5977.  
  5978.          Note:   Text fields and date fields within a range are ignored,
  5979.     however the range must be specified by two numeric (or logical) cells.
  5980.     Logical fields with a True value will have the numeric value 1. Logical
  5981.     fields with a False value will have the numeric value 0.
  5982.  
  5983.        Text Fields
  5984.  
  5985.          When you use only the letter prefix of a text field, you will be
  5986.     using or setting the value of the entire field.  You may reference an
  5987.     individual line of the field if you are interested in the text in that
  5988.     particular line. For text fields the number part of the ID corresponds
  5989.     to a line. number. This is useful when you want to assign a string value
  5990.     to a specific line of the field. Or, you may want the text of a given
  5991.     line only to be used in a command.
  5992.  
  5993.          Note:   If the string does not fit in the particular line of the
  5994.     field, it will be truncated. Truncation means that the part that does
  5995.     not fit will be lost.
  5996.  
  5997.          The following example shows how text fields can be referenced.
  5998.  
  5999.          Text field M has 3 lines: M1, M2 and M3. M is 12 characters wide:
  6000.  
  6001.               M1 "first line  "
  6002.               M2 "second line "
  6003.               M3 "third line  "
  6004.  
  6005.          The command M2 = "this is a happy day" sets M2 to "this is a ha".
  6006.  
  6007.          The command C = M3 would set the value of the single line field C
  6008.          to the text in M3 or the third line of field M. That is, C would
  6009.          get the text "third line".
  6010.  
  6011.          If C were 36 characters wide, the command C = M would set C to
  6012.     "first line  second line third line" or the text from all lines of M
  6013.     strung out end to end.
  6014.  
  6015.          But if C were an 18 character 2 line field, the command C = M would
  6016.     put all three lines of M into the 2 lines of C.
  6017.  
  6018.                           Copyright (c) 1993 Piaf, Inc.
  6019.  
  6020.     Surefire S2.0 User's Guide                                       Page 103
  6021.  
  6022.     Tracing References
  6023.  
  6024.          Sometimes you may have a rather complex expression in your field
  6025.     command with references to various fields. It then becomes difficult to
  6026.     know which field in the document corresponds to each reference in this
  6027.     command. Surefire alleviates this problem by allowing you to highlight
  6028.     the cell in the document that corresponds to a reference. This is called
  6029.     tracing. Tracing will work for references by field ID and references by
  6030.     field names.
  6031.  
  6032.          To trace a command you can use (Ctrl + N), (Ctrl + P) and (Ctrl +
  6033.     T) while the cursor is in the edit area of the Command Edit window.
  6034.     Pressing (Ctrl + N) will cause Surefire to scan the command string, find
  6035.     the next reference to a cell in your document, then scroll the document
  6036.     and highlight the corresponding cell. By looking at the context of the
  6037.     cell in the document and how that cell is used in a command, you have
  6038.     better control of your field commands.  (Ctrl + P) will scan the command
  6039.     backward instead, looking for the previous reference.  And, (Ctrl + T)
  6040.     will locate the reference that is at the cursor.
  6041.  
  6042.               To Highlight             Press
  6043.  
  6044.               The next reference       Ctrl + N
  6045.               The previous reference   Ctrl + P
  6046.               The current reference    Ctrl + T
  6047.  
  6048.     Assignment Statements
  6049.  
  6050.          Normally, the result of a command in a field or cell is displayed
  6051.     in the field or cell that contains the command. Sometimes you may want
  6052.     to put the result elsewhere.  This is done by assignment.  The following
  6053.     table lists the types of assignments that may be used in field commands.
  6054.  
  6055.          Assignment Form     Meaning
  6056.  
  6057.          cell = n            Numeric Assignment - Put n in field.
  6058.          field = date        Date Assignment - Put date in date field.
  6059.          field = string      Text Assignment - Put string in text field.
  6060.          cell = string       Text Assignment - Put string in specific line
  6061.                              of text field.
  6062.          range = n           Numeric Range Assignment - Put n in all
  6063.                              numeric cells in range.
  6064.          range = date        Date Range Assignment - Put date in all date
  6065.                              fields in range.
  6066.          range = string      Text Range Assignment - Put string in all text
  6067.                              fields in range.
  6068.  
  6069.  
  6070.        Implicit Assignment
  6071.          You use implicit assignment (no '='), to put an expression or
  6072.     function result into the cell containing the field command. When you
  6073.     have a field command without an assignment, the result of the command
  6074.     will be entered into the same field or cell that contains that command.
  6075.  
  6076.  
  6077.                           Copyright (c) 1993 Piaf, Inc.
  6078.  
  6079.     Surefire S2.0 User's Guide                                       Page 104
  6080.  
  6081.         Explicit Assignment To a Field
  6082.  
  6083.          You use explicit assignment (with an '=') to put the result of an
  6084.     expression somewhere explicitly.  Assignment is done by specifying the
  6085.     ID or name of the cell or field into which you want a result put,
  6086.     followed by "=", which is then followed by the command expression. For
  6087.     example, "A = B*10" will multiply the value of B by 10 and put the
  6088.     result in A.
  6089.  
  6090.        Assignment To a Range of Cells
  6091.  
  6092.          Assignments can also be made to a range of cells. This is done by
  6093.     using the range operator ":" to describe the range, followed by an equal
  6094.     sign '=', which is then followed by the command expression. For example,
  6095.     if you want all cells in the range A1:D3 to be cleared to zero when
  6096.     button X is pushed, the command in X would be "A1:D3 = 0".
  6097.  
  6098.     Multiple Statements
  6099.  
  6100.          Occasionally you may want to put more than one expression or
  6101.     statement in a command line. All of these statements will be evaluated
  6102.     before evaluating the command in another cell. To have multiple
  6103.     statements, separate each statement with a semicolon ';'. There must be
  6104.     no semicolon after the last statement.
  6105.  
  6106.          If a field command with multiple statements uses implicit
  6107.     assignment more than once, the result of the last such command will be
  6108.     displayed in the cell.
  6109.  
  6110.     Operating with Numbers
  6111.  
  6112.          Mathematical expressions result in numbers which are usually
  6113.     displayed as values in one or more numeric fields. They can also be used
  6114.     in some cases as arguments to functions for other data types. As
  6115.     discussed earlier in the Calculator chapter, mathematical expressions
  6116.     are generally created from numbers, numeric operators and functions.
  6117.     Surefire supports the following numeric operators:
  6118.  
  6119.          Two number operators     One number operators
  6120.  
  6121.          +    Addition            -         Negation
  6122.          -    Subtraction
  6123.          *    Multiplication
  6124.          /    Division
  6125.  
  6126.          Numeric field commands include simple expressions like 54 * 10 and
  6127.     expressions that contain field references, like (A - 45)/B * 100. In the
  6128.     second expression, A and B represent the numbers that are contained in
  6129.     other numeric fields with IDs of A and B respectively.  Numeric commands
  6130.     can also contain functions.  For example, @PI * A * A calculates the
  6131.     area of a circle where the radius is the value in the field called 'A'.
  6132.     @PI is a function.
  6133.  
  6134.  
  6135.  
  6136.                           Copyright (c) 1993 Piaf, Inc.
  6137.  
  6138.     Surefire S2.0 User's Guide                                       Page 105
  6139.  
  6140.          There are general mathematical functions including one to obtain
  6141.     the absolute value of a number and one that determines a number's square
  6142.     root.  There are trigonometric functions like @SIN and @COS and
  6143.     logarithmic functions.  There are also financial analysis and
  6144.     statistical functions. All numeric functions are also available in the
  6145.     Calculator. They are all completely described in "Appendix A: Surefire
  6146.     Function Reference".
  6147.  
  6148.     Operating with Text
  6149.  
  6150.          While numeric expressions result in a number, textual expressions
  6151.     result in a string of text.  This implies that a textual expression can
  6152.     be a field command for a text field.  The simplest text expression
  6153.     involves concatenation.  Concatenation is as simple as adding two
  6154.     numbers together but instead it combines two text strings into one by
  6155.     putting one after the other.  The operator "&" is used for
  6156.     concatenation.
  6157.  
  6158.          Example Joining Strings
  6159.  
  6160.          The two strings "foot" and "ball" can be concatenated with the
  6161.          command "foot" & "ball".  When executed, the single string
  6162.          "football" will be the result displayed in the text field.
  6163.  
  6164.          Any string can be specified in a command by being in quotation
  6165.     marks. This is called a string constant. Let's look at another example
  6166.     of operating on text that will combine concatenation with field values
  6167.     and string constants. Suppose you wanted to construct a sentence like
  6168.     "Big girls          " where some information was already set and some
  6169.     could be filled in.
  6170.  
  6171.          Another Example Joining Strings
  6172.  
  6173.          Let's set things up so that you can specify the third word of the
  6174.          sentence in a separate field. We will enter the missing word in
  6175.          text field A. Text field B will display the resulting sentence. To
  6176.          do this, you put this command into B: "Big girls " & A & "."
  6177.  
  6178.          The resulting string is the concatenation of 3 strings; one from
  6179.          another text field, A, and two from within the command itself.
  6180.          Notice that the period '.' which ends the sentence is a string.
  6181.  
  6182.          Surefire provides many text functions to manipulate text values.
  6183.     The result of a text function or at least one argument is a text string
  6184.     or reference to a text field.  For example, the function @SUBSTR() finds
  6185.     a string within a string (or substring), of a given text field or text
  6186.     constant.  If field R has the value "mission", the command @SUBSTR(R, 0,
  6187.     4) would result in the string "miss".
  6188.  
  6189.  
  6190.  
  6191.  
  6192.  
  6193.  
  6194.  
  6195.                           Copyright (c) 1993 Piaf, Inc.
  6196.  
  6197.     Surefire S2.0 User's Guide                                       Page 106
  6198.  
  6199.          Some text functions yield numeric results which can be used in
  6200.     mathematical expressions. For example, the function @LENGTH(string)
  6201.     returns the number of characters in a string. This number can then be
  6202.     divided into 80 to see how many times the string would fit on a line of
  6203.     a page. Likewise, if a text function required a number as an argument,
  6204.     this argument can be any mathematical expression. All text functions are
  6205.     described in "Appendix A: Surefire Function Reference".
  6206.  
  6207.     Conditions and Logical Expressions
  6208.  
  6209.          You use a condition to do some action or assign some value "IF"
  6210.     something is either true or false. For example, in calculating your
  6211.     taxes, you would want the amount owed to always be zero if you had a
  6212.     loss. Alternatively if you made a profit then you would make sure that
  6213.     the amount owed was some number greater than zero.
  6214.  
  6215.          Logical expressions are used to determine the value of a condition
  6216.     or a value to be displayed in a logical field. They always yield the
  6217.     result of True or False. If the value is displayed in a logical field,
  6218.     it will be in one of the 4 formats that you had chosen for that field.
  6219.     The table below shows what will be displayed in a field.
  6220.  
  6221.          Format         Display if True          Display if False
  6222.  
  6223.          Y/N            Y                        N
  6224.          On/Off         On                       Off
  6225.          YES/NO         YES                      NO
  6226.          True/False     True                     False
  6227.  
  6228.          Any mathematical expression can be a logical expression.  This is
  6229.     because the value zero is always defined to be the same as False and all
  6230.     other numbers are defined to be True.
  6231.  
  6232.          After you know how to enter field commands, you can verify this
  6233.     with the following exercise. Create a numeric field A and a logical
  6234.     field B.  Put the command "A" in the field B. When you type 0 in field
  6235.     A, you will see the word "False" or "No", etc. displayed in B.  Any
  6236.     other number will produce the opposite result.
  6237.  
  6238.          A logical value can also be explicitly defined by using the
  6239.     functions @TRUE and @FALSE.  These are in fact equivalent to using the
  6240.     numbers 1 for True and 0 for False, but are much more readable.
  6241.  
  6242.     Logical Operators
  6243.  
  6244.          Logical values can result from logical expressions which are
  6245.     constructed by using logical operators and possibly logical functions.
  6246.     Surefire supports the following operators:
  6247.  
  6248.          Operator  Meaning
  6249.  
  6250.          =         Equal To
  6251.          <         Less Than
  6252.          < =       Less Than or Equal To
  6253.  
  6254.                           Copyright (c) 1993 Piaf, Inc.
  6255.  
  6256.     Surefire S2.0 User's Guide                                       Page 107
  6257.  
  6258.          Operator  Meaning (cont)
  6259.  
  6260.          >         Greater Than
  6261.          > =       Greater Than or Equal To
  6262.          <>        Not Equal To
  6263.  
  6264.          Note:   These operators require a number or mathematical expression
  6265.     on either side of the operator in order to be evaluated.
  6266.  
  6267.          Examples of Logical Expressions
  6268.  
  6269.          age < 50
  6270.          balance < = 0
  6271.          emplnum = 468
  6272.  
  6273.     Complex Logical Expressions
  6274.  
  6275.          You can make even more complex logical expressions by using the
  6276.     logical operators #AND# and #OR# to combine logical expressions
  6277.     together. You can also use an additional operator #NOT#. This takes
  6278.     the logical expression right after it, evaluating it as if it were just
  6279.     the opposite. True expressions are looked at as False and vice-versa.
  6280.  
  6281.          Examples of Complex Logical Expressions
  6282.  
  6283.          salary < 15000 #AND# dept <> 15
  6284.          age > 60 #OR# weight > 200
  6285.  
  6286.     Logical Condition Function
  6287.  
  6288.          A logical condition function does something different based on
  6289.     whether the given logical expression is True or False. To do this there
  6290.     is a special function:
  6291.  
  6292.          @IF(condx, true, false)
  6293.  
  6294.          The condition condx is a logical expression. If condx evaluates to
  6295.     True, then the function specified as the argument true is executed,
  6296.     otherwise the condition must be false, so the function specified as the
  6297.     argument false is executed instead.
  6298.  
  6299.          Logical Condition Function Example
  6300.  
  6301.          Make sure a negative tax is never calculated. Assume we have a
  6302.          simple tax rate of 10% and the following command:
  6303.  
  6304.               @IF( A1 > 0,A1 *.10,0 )
  6305.  
  6306.          Surefire will take the value in cell A1, the income, and see
  6307.          whether it is greater than 0.  If it is, it is multiplied by .10 to
  6308.          give 10 percent of it.  Otherwise, the result is set to the third
  6309.          argument, zero.
  6310.  
  6311.     Note:  Multiple statements are not supported within @IF functions.
  6312.  
  6313.                           Copyright (c) 1993 Piaf, Inc.
  6314.  
  6315.     Surefire S2.0 User's Guide                                       Page 108
  6316.  
  6317.     Control Operations
  6318.  
  6319.          Control operations are field commands that cause some action to
  6320.     take place. These actions include moving to a particular page or field
  6321.     of your document, and displaying a different document altogether.
  6322.     Control functions are functions that perform an immediate action.
  6323.     Because the result is an action, these functions are generally used with
  6324.     button fields or in commands with the Execute on Enter prefix "[".
  6325.     You can even use button fields and their commands to do such things as
  6326.     pass a field value between documents.
  6327.  
  6328.          There are various types of control functions. There are functions
  6329.     to run a DOS command from a Surefire document, to define help contexts
  6330.     for your own Surefire applications and to display Surefire document
  6331.     screens one after the other as an automatic presentation. All control
  6332.     functions are fully described in "Appendix A: Surefire Function
  6333.     Reference". The following sections discuss topics that are important
  6334.     when using control functions.
  6335.  
  6336.     Errors in Control Functions
  6337.  
  6338.          Control functions generally return a logical value.  If this is a
  6339.     True value, the function was executed as expected.  If a False was
  6340.     returned, there was some sort of problem. A False returned from an
  6341.     @GODOC, @RETURN, or the database control function @JOIN will stop
  6342.     execution of the remaining statements for that command string, if there
  6343.     are any.  For all other control functions,  Surefire will display
  6344.     "COMMAND ERROR" in the status line but will attempt to continue
  6345.     processing the remaining statements of the command.
  6346.  
  6347.     Document Levels
  6348.  
  6349.          Some control functions cause Surefire to display a different
  6350.     document than the one currently displayed. These functions are @GODOC,
  6351.     @RETURN, and the database command function @JOIN. Each time @GODOC or
  6352.     @JOIN is successfully executed, Surefire displays a document.  This
  6353.     document is considered to be at a new document level.
  6354.  
  6355.          You return to the document at the previous level by executing
  6356.     @RETURN or by indicating an implicit  return by pressing (Esc). The
  6357.     @RETURN function also has an optional argument that allows you to return
  6358.     by more than one level. This will skip the display of intervening
  6359.     documents.
  6360.  
  6361.          Surefire maintains the hierarchy of document levels until you exit
  6362.     Surefire or explicitly read a document by choosing Get or New from the
  6363.     File menu.
  6364.  
  6365.     Changing Directories
  6366.          The same control functions that affect document levels may also
  6367.     cause Surefire to change directories. You can specify that a document
  6368.     named in an @GODOC or @JOIN command is in a different directory by
  6369.     specifying "name" as a relative path name. When the @GODOC or @JOIN are
  6370.  
  6371.  
  6372.                           Copyright (c) 1993 Piaf, Inc.
  6373.  
  6374.     Surefire S2.0 User's Guide                                       Page 109
  6375.  
  6376.     successfully executed, Surefire will change directories prior to looking
  6377.     for and reading the document.
  6378.  
  6379.          Once the document is displayed, all references to other documents
  6380.     are expected to be in the new directory just as if you had used the
  6381.     Setup window to change the directory. One difference between changing
  6382.     directories this way and using Setup is that you will eventually return
  6383.     to a document in the original directory.  You will return to the
  6384.     previous directory when you return from the first document that you
  6385.     displayed in this other directory.
  6386.  
  6387.  
  6388.     More About Command Execution
  6389.  
  6390.          There are various ways in which a command can be executed.  The
  6391.     best way depends on the type of command to be executed and the size of
  6392.     the document.  Sometimes you may desire to have an individual command
  6393.     executed by pressing a button or after entering a value. Another
  6394.     application may require you to occasionally recalculate all the commands
  6395.     within the document.  For large spreadsheets, you want to recalculate
  6396.     only the commands on the page on which you are working. You may also
  6397.     choose to have Surefire execute commands in a vertical or horizontal
  6398.     order. The following sections discuss the four methods of execution,
  6399.     horizontal versus vertical ordering, and what happens if Surefire cannot
  6400.     execute a command.
  6401.  
  6402.        Automatic Command Execution
  6403.  
  6404.          When commands are executed automatically, all commands within the
  6405.     document are executed whenever the value of any field is changed. It is
  6406.     necessary to execute all of them since other commands may depend on the
  6407.     value that was just entered.  When the document is small or the
  6408.     information within fields is changed infrequently, this is a very
  6409.     satisfactory way to assure all calculations are current.
  6410.  
  6411.          This feature can be turned on or off by choosing "Auto Calc" on the
  6412.     Field menu.  In addition, you may select an option in the Setup window
  6413.     to have auto calc be set by default whenever you use a Surefire
  6414.     document.  An "X" on the menu indicates that auto calculate is on.
  6415.  
  6416.          Note:    When Auto Calc is not on, and values have been changed in
  6417.     the document, a 'C' is displayed at the far right of the status line.
  6418.     This indicates that a recalculation needs to be performed.
  6419.  
  6420.        Explicit Execution by Page or Document
  6421.  
  6422.          When Auto Calc is off, you need a way to tell Surefire to go ahead
  6423.     and do the calculations. You can specify that either all commands on a
  6424.     single page, or that all commands in the document, are to be executed.
  6425.         All commands contained in fields on the currently displayed page
  6426.     can be recalculated by pressing (F9).  Since you normally work on one
  6427.     page at a time, this is convenient and requires comparatively little
  6428.     processing overhead. You can also force the calculation of all
  6429.  
  6430.  
  6431.                           Copyright (c) 1993 Piaf, Inc.
  6432.  
  6433.     Surefire S2.0 User's Guide                                       Page 110
  6434.  
  6435.     non-immediate commands within the document by choosing "Calc All" on
  6436.     the Field menu or by pressing (Shift + F9). Immediate commands are those
  6437.     that are in button fields or those set to Execute on Enter (see below).
  6438.     Non-immediate commands are all others.
  6439.  
  6440.        Execution by Buttons
  6441.  
  6442.          Button fields have their own rules about when their commands are
  6443.     executed.  When you push a button, be it a doorbell or a button within
  6444.     a Surefire document, you expect the action performed to be immediate. In
  6445.     the case of the doorbell, a sound is made.  In the case of a Surefire
  6446.     button, the command is executed when you press (Enter).
  6447.  
  6448.        Execute on Enter
  6449.  
  6450.          Sometimes you may want to have a command executed just after
  6451.     information is entered into the field or cell containing the command.
  6452.     This is similar to the way buttons behave.  To do this, you prefix the
  6453.     command by a special character '[' (left bracket).  When a [ is the
  6454.     first character of the command, Surefire knows to execute the command
  6455.     when you change the data in the field. This command will not be executed
  6456.     at any other time.
  6457.  
  6458.          To tell Surefire that you are changing a field value, you first
  6459.     type or select the new value. You then enter the value by pressing
  6460.     (Enter) or by moving the cursor off of the field. For example, putting
  6461.     the command [ @GOPAGE(5) in a numeric, date, text or logical field will
  6462.     display page 5 of your document when you enter a value in the field.
  6463.  
  6464.        Order of Execution
  6465.  
  6466.          When you execute commands by page or document, the order  in which
  6467.     the fields are traversed and the commands executed may affect the
  6468.     results of some calculations.  If you understand this order, you could
  6469.     prevent getting improper results. Usually commands are executed is the
  6470.     same order that you read text on a page. That is, from left to right and
  6471.     down or horizontally.  This is a natural way to look at information in
  6472.     many Surefire documents.
  6473.  
  6474.          Sometimes, especially in spreadsheet-like applications, you want to
  6475.     think of things in columns arranged from left to right.  If this is the
  6476.     case, it might be more appropriate to have Surefire execute commands on
  6477.     a column by column basis or vertically.  You will learn how to specify
  6478.     this distinction in the following chapter entitled "Spreadsheets".
  6479.  
  6480.  
  6481.     Command Errors
  6482.  
  6483.          If you specify a command incorrectly, Surefire will not know what
  6484.     you want it to do so it will fill the field containing the command with
  6485.     E's to indicate an error.  In addition, the status indicator "COMMAND
  6486.     ERROR" will be displayed for a few moments in the upper right corner of
  6487.     your screen. The E's will go away if you clear the field (press Ctrl+K)
  6488.     or correct and re-execute the offending command.
  6489.  
  6490.                           Copyright (c) 1993 Piaf, Inc.
  6491.  
  6492.     Surefire S2.0 User's Guide                                       Page 111
  6493.  
  6494.     Scrolling the Command Window Edit Area with the Mouse
  6495.  
  6496.          The edit area of the Command Edit Window may contain up to 10 lines,
  6497.     though only 2 lines are displayed at a time. Arrows at the right side of
  6498.     the edit area tell whether there are more lines to be displayed. A down
  6499.     arrow indicates that there are more lines below the currently displayed
  6500.     lines while an up arrow indicates that there are more lines above. Both
  6501.     arrows may be displayed at the same time. To scroll the edit area with
  6502.     the mouse, Hold the left mouse button while the mouse cursor is positioned
  6503.     on one of these arrows. The edit area will scroll in the direction of the
  6504.     arrow.
  6505.  
  6506.  
  6507.  
  6508.  
  6509.  
  6510.  
  6511.  
  6512.  
  6513.  
  6514.  
  6515.  
  6516.  
  6517.  
  6518.  
  6519.  
  6520.  
  6521.  
  6522.  
  6523.  
  6524.  
  6525.  
  6526.  
  6527.  
  6528.  
  6529.  
  6530.  
  6531.  
  6532.  
  6533.  
  6534.  
  6535.  
  6536.  
  6537.  
  6538.  
  6539.  
  6540.  
  6541.  
  6542.  
  6543.  
  6544.  
  6545.  
  6546.  
  6547.  
  6548.  
  6549.                           Copyright (c) 1993 Piaf, Inc.
  6550.  
  6551.     Surefire S2.0 User's Guide                                       Page 112
  6552.  
  6553.     Chapter 16     -         Spreadsheets
  6554.  
  6555.          In Surefire, it is not necessary to lay out your fields to look
  6556.     like the rows and columns of a conventional spread sheet.  As you have
  6557.     seen, you can have fields anywhere within a document page, embedded in
  6558.     text paragraphs or not. Sometimes, however, you may want to use fields
  6559.     that are arranged in rows and columns.  This is especially useful in
  6560.     accounting applications such as expense reports, budgets and cash flow
  6561.     statements.
  6562.  
  6563.          In this chapter, you will see how to create fields that present a
  6564.     tabular view of information normally called spreadsheets.  Of course,
  6565.     the "what-if" analysis is naturally supported by Surefire's field
  6566.     commands and methods of command execution.
  6567.  
  6568.     Creating a Spreadsheet
  6569.  
  6570.          To create a spreadsheet in Surefire you first create the number of
  6571.     multiple line numeric fields that you desire.  Each multiline field
  6572.     represents a column and each line of field cells represents a row. For
  6573.     example if you want to create a 10x10 spreadsheet, you would create 10
  6574.     multiline numeric fields that are side by side. Each of these fields
  6575.     should have 10 cells. If you desire, you can label the columns A, B, C,
  6576.     .... J, and the rows 1, 2, 3, .... 10 by editing the document. Once you
  6577.     have a spreadsheet document like this, you can save it and use copies
  6578.     for various purposes. You can put commands into any or all of the cells
  6579.     in your document to do your analysis.
  6580.  
  6581.     Using a Spreadsheet
  6582.  
  6583.          Once you have a document with fields that are laid out as a
  6584.     spreadsheet, you use it the same way that you use any document in
  6585.     Surefire. You give the cells of the spreadsheet any desired field
  6586.     commands, enter field values as needed, and press (F9) to execute the
  6587.     commands and compute your results.
  6588.  
  6589.     Absolute and Relative References
  6590.  
  6591.          A command can be copied from one cell to another by using Cut &
  6592.     Paste as described in the previous chapter. Normally these commands are
  6593.     copied exactly as they are.  But often you find, especially in
  6594.     spreadsheet-like applications, that you need the exact same formula in
  6595.     many cells with only the references changed by some regular means.
  6596.     Surefire and many spreadsheet programs handle this by using the concepts
  6597.     of absolute and relative  references.
  6598.  
  6599.          Unlike other spreadsheet programs, Surefire's default is to use
  6600.     absolute referencing. This is because, in most instances, Surefire
  6601.     fields are laid out in a non-tabular way, making absolute referencing
  6602.     more natural.
  6603.          The best way to understand the difference between Absolute and
  6604.     Relative references is to describe the location of someone's house in
  6605.     two ways. If you say that George is at "123 Main Street", you are giving
  6606.  
  6607.  
  6608.                           Copyright (c) 1993 Piaf, Inc.
  6609.  
  6610.     Surefire S2.0 User's Guide                                       Page 113
  6611.  
  6612.     the absolute location of his house. No matter where you are, the
  6613.     location you are talking about is the actual location of his house. On
  6614.     the other hand, if you say he is "3 blocks north of here", you are
  6615.     describing where he lives relative to where you are now. Keeping this in
  6616.     mind will help you in the following discussions.
  6617.  
  6618.          In Surefire, the terms Absolute and Relative only have meaning when
  6619.     a command is put in a field.  Absolute means that the reference remains
  6620.     exactly the same no matter where a field command is copied. Say you have
  6621.     fields A, B, C and D and cell A1 has the command B1 + C1. If you copy
  6622.     this command to D using absolute referencing, the command in D will be
  6623.     exactly the same or B1 + C1.
  6624.  
  6625.          When references in a field command are made relative, copying the
  6626.     command will adjust the references in a prescribed way.  This adjustment
  6627.     is done based on the relative position of the cell containing the
  6628.     original command to any cells referenced relatively in that command.
  6629.     Let's say you have four multi-celled fields, A, B, C, and D horizontally
  6630.     on the screen, each separated from the other by the same distance.
  6631.  
  6632.          If C1 has the command A2 + B2, and you copy this command to D1 with
  6633.     relative referencing, the resulting command in D1 will be B2 + C2. This
  6634.     is because A2 and B2 are at the same relative position from C1 as B2 and
  6635.     C2 are from D1.
  6636.  
  6637.     Loading Commands with Relative References
  6638.  
  6639.          If you copy fields in Document edit mode, the field commands for
  6640.     the new fields will be cleared while those of the original fields remain
  6641.     unchanged. To copy the field commands you must use the Command Edit
  6642.     window. When you copy commands, you have control over how the commands
  6643.     are copied. You can copy commands relatively provided that the
  6644.     destination field cells already exist.
  6645.  
  6646.          A relative copy is set up as follows:  You position to the cell
  6647.     that has the desired command and open the Command Edit window. Then,
  6648.     copy the command from that cell into the edit area. Now, set the
  6649.     "Absolute/Relative" multiple choice button to Relative.  Notice that the
  6650.     ID of this cell appears to the right of the button. This tells Surefire
  6651.     that all subsequent pastings of this command into other cells will be
  6652.     done relative to the cell from which you copied the command. As you copy
  6653.     this command into other cells, all the references of the command will be
  6654.     adjusted accordingly. This will continue until you either toggle the
  6655.     button back to Absolute, Paste the command in a cell or change the
  6656.     command in the edit area.
  6657.  
  6658.          If you want to make a relative copy of a command into more than one
  6659.     cell, use Paste & Keep instead of Paste. The references will be adjusted
  6660.     for each cell until one of the above conditions happen.
  6661.          Note:  If there is a relative reference that can not be adjusted to
  6662.     an actual cell in your document with respect to the destination field or
  6663.     cell, the absolute cell reference will be copied to that field or cell.
  6664.  
  6665.  
  6666.  
  6667.                           Copyright (c) 1993 Piaf, Inc.
  6668.  
  6669.     Surefire S2.0 User's Guide                                       Page 114
  6670.  
  6671.     Vertical and Horizontal Relative References
  6672.  
  6673.          Let's think about the analogy of where George lives one more time.
  6674.     Suppose we say George is "3 blocks north on Main Street".  Main Street
  6675.     could be east or west of us but that doesn't matter because we have
  6676.     described its absolute location. However, "3 blocks north" is still
  6677.     relative to where we are.  We gave a relative vertical  (eg.
  6678.     north/south) direction and an absolute horizontal direction (eg. Main
  6679.     Street is either east or west). You can do the same with Surefire
  6680.     fields.
  6681.  
  6682.          Now suppose you want some references to be relative and some to be
  6683.     absolute.  This may be desirable when you copy formulas that contain
  6684.     some "constant" values that should not change no matter where the
  6685.     formulas are copied. For example, suppose we added a field E to our
  6686.     spreadsheet. The value in E needs to be added to each of the commands in
  6687.     all the other cells. When you copy A2 + B2 + E relatively from cell C1
  6688.     to cell D1 you want to end up with B2 + C2 + E.
  6689.  
  6690.          Alternatively, suppose you want a reference to be relative only in
  6691.     one direction. A reference that is relative vertically and absolute
  6692.     horizontally results in the copy being adjusted to a cell that is
  6693.     vertical to the cell with the copied command.  This vertical distance is
  6694.     the distance of the original cell to its original vertical reference.
  6695.     Likewise, a reference that is relative horizontally and absolute
  6696.     vertically results in the copy being adjusted to a cell that is
  6697.     horizontal to the cell with the copied command.  This horizontal
  6698.     distance is the distance of the original cell to its original horizontal
  6699.     reference.
  6700.  
  6701.          To limit how Surefire does a relative copy, you use dollar signs
  6702.     ($) in the part of the reference that you want to keep absolute. The
  6703.     following table shows the four possibilities of referencing for the cell
  6704.     A1. Other cells such as BQ12, A5, etc. change in a similar way:
  6705.  
  6706.          Cell Reference      Meaning
  6707.  
  6708.          A1                  Relative both vertically and horizontally
  6709.          $A1                 Relative vertically only
  6710.          A$1                 Relative horizontally only
  6711.          $A$1                Absolute
  6712.  
  6713.     Note:   The use of dollar signs ($) only applies when you are doing a
  6714.     relative command copy That is when the button in the command window is
  6715.     set to Relative. If the button is set to Absolute these specifications
  6716.     are ignored and an absolute copy is done in all cases.
  6717.  
  6718.     Note:   Changing the reference type will not occur with named references
  6719.     but only with Surefire's unique field ID's.
  6720.  
  6721.  
  6722.  
  6723.  
  6724.  
  6725.  
  6726.                           Copyright (c) 1993 Piaf, Inc.
  6727.  
  6728.     Surefire S2.0 User's Guide                                       Page 115
  6729.  
  6730.        Absolute/Relative Toggle Key
  6731.  
  6732.          You can enter the dollar signs by typing them at the appropriate
  6733.     locations in the cell reference as shown above. There is, however,  a
  6734.     more convenient way to change reference types from within the command
  6735.     edit area of the Command Edit window. With the cursor over the reference
  6736.     to change, press (F4) successively to go through all four combinations
  6737.     of references. This is known as the absolute/relative toggle key.
  6738.  
  6739.          You can use the Absolute/Relative toggle key to make a reference
  6740.     relative in the vertical direction only.  This means that the letter
  6741.     part of the reference will stay the same but the number part will
  6742.     change.
  6743.  
  6744.     Enlarging A Spreadsheet
  6745.  
  6746.          Since Surefire fields are not constrained to a fixed row and column
  6747.     grid, you need an easy way to enlarge your spread sheet. Using a
  6748.     combination of techniques that are available for manipulating fields,
  6749.     you can easily enlarge your spreadsheet by switching to Document Edit
  6750.     mode and enlarging each of the multi-lined fields. At the same time you
  6751.     may create additional fields for your spreadsheet.
  6752.  
  6753.     Using a Range of Fields
  6754.  
  6755.          When you want to load a command with relative references into many
  6756.     cells, putting it into each cell one by one would be a tedious task.
  6757.     You can accomplish this very quickly by first selecting a range of
  6758.     fields and then doing a Paste operation on the command.
  6759.  
  6760.        Selecting a Range of Fields
  6761.  
  6762.          Range selections are initiated by choosing the "Field Select
  6763.     Alt+J" menu item on the Edit menu while you are in Use mode and the
  6764.     Command Edit window is displayed.  (Conversely, the Block selection you
  6765.     did to enlarge the spreadsheet was done during Document edit. ).
  6766.  
  6767.          If the cursor is free, all cells that are completely contained
  6768.     within the bounds of the start position and the current cursor position
  6769.     become selected.  The selection occurs as the cursor is moved down and
  6770.     to the right with the arrow keys.  The range shrinks when the cursor is
  6771.     then moved up or to the left.
  6772.  
  6773.          If the cursor is not free, a rectangle of fields are selected
  6774.     corresponding to the left corner of the cell in which the selection was
  6775.     started and the right corner of the current cell. The selection occurs
  6776.     as the cursor is moved down and to the right with the arrow keys or with
  6777.     a combination of (End) and (down arrow).  The range shrinks when the
  6778.     cursor is then moved up or to the left.
  6779.          In either case, as with any selection in Surefire, if you move the
  6780.     cursor to the left or above the initial cursor position, the field
  6781.     selection operation is canceled. You can also cancel the operation
  6782.     directly by pressing (Esc).
  6783.  
  6784.  
  6785.                           Copyright (c) 1993 Piaf, Inc.
  6786.  
  6787.     Surefire S2.0 User's Guide                                       Page 116
  6788.  
  6789.        Copy Commands Using Range Selection
  6790.  
  6791.          To copy commands using range selection you first must set the
  6792.     original command. Move to cell one cell of your spreadsheet and press
  6793.     (ALT+F10) to open the Command Edit window.  Enter the command to be
  6794.     copied in the edit area and press (ALT+F4) to Paste & Keep it.
  6795.  
  6796.          Now, Press (Home) to move to the Absolute/Relative button and press
  6797.     (Spacebar) to make the command Relative. Define the range by pressing
  6798.     (Shift+Tab) to go back to the document. Move the cursor to the upper
  6799.     left-most cell to receive the adjusted command. Choose "Field Select"
  6800.     from the Edit menu or press (ALT+J) to start Field selection. Move the
  6801.     cursor to the lower right-most cell. These cells will be the destination
  6802.     of the pasted commands.
  6803.  
  6804.          Press (ALT+F4) to paste and keep the commands. If you now look at
  6805.     the commands in the cells you will see that each has a similar command
  6806.     with the references adjusted according to their position.
  6807.  
  6808.     Horizontal vs Vertical Execution Order
  6809.  
  6810.          The order of execution determines whether field commands will be
  6811.     calculated in a row by row (i.e. horizontal) or column by column (i.e.
  6812.     vertical) order. This order may affect the resulting values in your
  6813.     fields because some expressions may depend on field values already being
  6814.     known. If these particular fields are above, below, to the left or right
  6815.     of the field containing the command then the execution order may affect
  6816.     your results. The default order in Surefire is horizontal but it is up
  6817.     to you to determine the best order for your needs.
  6818.  
  6819.          You can change the order of execution on a page by page basis.  To
  6820.     do this, you use a multiple choice button located in the Command Edit
  6821.     window. This button displays the current execution order as either Vert
  6822.     or Horiz corresponding to a vertical and horizontal order respectively.
  6823.     You toggle this button to set the execution order for the current page.
  6824.     It does not matter what the current field is when this button is set.
  6825.     All fields on the same page will have the same execution order.
  6826.  
  6827.     Multiple Field Selection with the Mouse
  6828.  
  6829.          To select more than one field for pasting commands, you can use the
  6830.     mouse to define the upper left and lower right corners of a rectangle
  6831.     containing the desired fields.
  6832.  
  6833.          First move the mouse to the left side of the upper leftmost field,
  6834.     Click and choose Field Select from the Edit menu. Now, move the mouse to
  6835.     the right edge of the lower rightmost field and Click. Be sure that the
  6836.     rectangle fully contains the fields and/or cells that you want. Now
  6837.     paste the command.
  6838.  
  6839.  
  6840.  
  6841.  
  6842.  
  6843.  
  6844.                           Copyright (c) 1993 Piaf, Inc.
  6845.  
  6846.     Surefire S2.0 User's Guide                                       Page 117
  6847.  
  6848.     Chapter 17     -    Introduction to Databases
  6849.  
  6850.          Any Surefire document that has fields has data associated with
  6851.     those fields. Data is simply the values contained in Surefire fields. In
  6852.     the simplest sense, the current values of fields are saved automatically
  6853.     with a document when you save the document. So one set of data, the
  6854.     displayed field values, is always associated with a document. This set
  6855.     of data is known as a data record or simply a record.  Sometimes you may
  6856.     want to work with more than one set of data. Being able to do just that
  6857.     is the basic idea of a database.
  6858.  
  6859.          You generally keep sets of similar information about something in
  6860.     a database. In many ways a database is like a file cabinet. It may
  6861.     contain folders of information about each of your clients, recipes,
  6862.     employees, patients, suppliers, etc.  For each employee, you may keep
  6863.     personal information including their name, address and social security
  6864.     number.  For each recipe, you might keep a title and list of major
  6865.     ingredients. And for your rental property, you will want to easily
  6866.     access information about all tenants and leases.
  6867.  
  6868.          To define a database in Surefire, you indicate those fields of your
  6869.     document which are to contain more than one value. That's all there is
  6870.     to it!  Surefire will automatically create your database!  You can now
  6871.     add, change or delete records at any time. After records have been
  6872.     added, you can selectively look at specific records.
  6873.  
  6874.          In this and the following two chapters you will learn how to
  6875.     manipulate data records and how to find the ones in which you may be
  6876.     interested. In addition, you will learn how to calculate information and
  6877.     generate statistics based on your stored data. You will also learn how
  6878.     to enlarge fields that are too small, add additional fields, and remove
  6879.     fields that you no longer need. Later, in the chapter "Generating
  6880.     Reports", we will expand on these concepts so that you learn how to look
  6881.     at and print multiple data records at one time with a Surefire document.
  6882.  
  6883.     Storing Data
  6884.  
  6885.          Naturally, the first thing that you will want to do is to create a
  6886.     database and start adding information. In Surefire, the creation of a
  6887.     database is as simple as creating a field and adding your first data
  6888.     record. You will see a natural progression from storing a single data
  6889.     record directly in a document to storing many data records in a
  6890.     database.
  6891.  
  6892.        Specifying a Database Field
  6893.  
  6894.          The values of all Surefire fields, except buttons, may be stored in
  6895.     a database. To indicate that a field's data is to be stored in a
  6896.     database, you must set or modify the data attribute for that field using
  6897.     the Create Field or Modify Field windows.  To do this you must be in
  6898.     Document Edit mode. If the field already exists, select Modify from the
  6899.     Field Menu or press (ALT+M). Otherwise, for a new field press (ALT+C).
  6900.     Press (End) enough times to move the cursor down to the multiple choice
  6901.     button just below the heading Data. It should indicate "Not Stored".
  6902.  
  6903.                           Copyright (c) 1993 Piaf, Inc.
  6904.  
  6905.     Surefire S2.0 User's Guide                                       Page 118
  6906.  
  6907.          Press (ALT+Z) to display the button's pop-list and highlight
  6908.     "Stored".  Press (Enter) and then (Ctrl + Enter) to set the change.
  6909.  
  6910.          You need to set the choice to Stored for each field that you wish
  6911.     to store. Since button fields do not contain data, they cannot be
  6912.     Stored. When all fields are properly set, you can proceed to add data to
  6913.     your database. When you add your first record in the manner described in
  6914.     the next section, Surefire will create your database automatically. You
  6915.     may add other fields to your database at a later time.
  6916.          Note:   Each cell of a Stored multiple cell numeric field is stored
  6917.     separately in the database.
  6918.  
  6919.        Database Limits
  6920.  
  6921.          The visible size of your field generally determines the maximum
  6922.     amount or value of Stored data that field may contain. However, while
  6923.     non-stored text fields may have up to 4096 characters, a Stored text
  6924.     field may have no more than 254 characters. Likewise, the maximum size
  6925.     of a Stored numeric field is 16 characters wide.
  6926.  
  6927.          Various field formats may remove available characters from the
  6928.     visible field. For example, the value that a numeric field can contain
  6929.     is limited by the formatting specified for that field (eg. Currency
  6930.     format, number of decimal places, etc.). No matter which format you have
  6931.     chosen to display logical fields, they can have only 2 possible values:
  6932.     'T' or 'F'.
  6933.  
  6934.          While Stored dates may range from year 1 thru year 9999, a century
  6935.     other than 1900 may only be entered in long date format.  Even in long
  6936.     date format, if you use indexed or sorted searches to retrieve records,
  6937.     dates before Jan 1, 1900 or after Dec 31, 1999 will not be correctly
  6938.     ordered. The current century (ie. 1900) is assumed for the other date
  6939.     formats.
  6940.  
  6941.          Note:  You may designate up to 128 stored fields in a document.
  6942.  
  6943.        Adding a Data Record
  6944.  
  6945.          You can add your first record to a database once you have given a
  6946.     name to your document. This means you must first save a new document (to
  6947.     give it a name). Existing documents already have names. Surefire uses
  6948.     this name to create a separate place to keep the data records associated
  6949.     with the document.  You can then enter values into fields and store
  6950.     these values. You can add records as long as you have enough disk space.
  6951.  
  6952.          Remember that some fields have field commands in them to calculate
  6953.     their values. Field commands are automatically executed before a record
  6954.     is added to the database so that any stored fields with calculated
  6955.     values will have their correct values stored. In order not to waste time
  6956.     typing a value in a "calculated" field, you can usually skip fields when
  6957.     an '#' appears at the far right of the status line.
  6958.  
  6959.  
  6960.  
  6961.  
  6962.                           Copyright (c) 1993 Piaf, Inc.
  6963.  
  6964.     Surefire S2.0 User's Guide                                       Page 119
  6965.  
  6966.          To add a record, you must be Using your document. Now, enter values
  6967.     into the fields you want stored in the database. Choose "Add Record"
  6968.     from the Data Menu or press (ALT+A).  You have now added a record into
  6969.     a newly created database.
  6970.  
  6971.     Clearing All Fields
  6972.  
  6973.          You can clear the values of all the fields in your document to
  6974.     start afresh by choosing "Clear Fields" from the Field menu or pressing
  6975.     (ALT+Y). This will not affect data records stored in the database. If
  6976.     much of the information is the same from record to record, do not use
  6977.     this option and simply enter new values in only those fields that should
  6978.     have different values.
  6979.  
  6980.     Simple Data Search
  6981.  
  6982.          Now that there are records in the database, you will want to look
  6983.     at them. There are two simple ways that your data records may be
  6984.     retrieved. You can view each of the records in the same order that you
  6985.     added them to the database. Or, you can enter a value in one field and
  6986.     tell Surefire to display all the records that have that same value. In
  6987.     the next chapter, you'll learn more complex ways to retrieve your data.
  6988.  
  6989.          Before you start a search, you should Get the document that you
  6990.     used to add your records, if it is not already displayed. Since the
  6991.     document fields will be used to display the values stored in the
  6992.     database, you should also be Using the document (i.e. in Use mode).
  6993.  
  6994.        Viewing All Records
  6995.  
  6996.          The simplest way to look at your data is to retrieve your records
  6997.     in the order that they were added to the database. This is done by
  6998.     pressing (F8) (i.e. Next Record). The first record that was added will
  6999.     be displayed in your document. You can continue to press (F8) to view
  7000.     each successive record until you hear a beep. As each record is
  7001.     displayed, Surefire will also calculate the values of fields that are
  7002.     Not Stored.
  7003.  
  7004.          You may reverse the direction of the retrieval by pressing (F7)
  7005.     (i.e. Previous Record). When you again see the first record, another
  7006.     (F7) sounds a beep to indicate that you can't go any farther.
  7007.  
  7008.          Note:   If you add a record while viewing database records, that
  7009.     record will be appended to the end of the database and will become the
  7010.     currently displayed record.
  7011.  
  7012.        Database Status Information
  7013.  
  7014.          As each record is retrieved from the database, Surefire gives you
  7015.     important status information. When you press (F8), the status line
  7016.     showing the current document name and the current cursor position will
  7017.     change to show that a record is being displayed.
  7018.  
  7019.  
  7020.  
  7021.                           Copyright (c) 1993 Piaf, Inc.
  7022.  
  7023.     Surefire S2.0 User's Guide                                       Page 120
  7024.  
  7025.          The "1" means that you are looking at the first record and the "?"
  7026.     means that Surefire doesn't know at this point how many records you will
  7027.     eventually see. As each successive record is displayed, the "1" becomes
  7028.     2, 3, etc. When all the records have been displayed, the "?" will be
  7029.     replaced to show how many records have been displayed. When you are
  7030.     finished looking at these records, the normal status information (i.e.
  7031.     document page, line and column) can be redisplayed if you press (F3).
  7032.  
  7033.        Getting Specific Records
  7034.  
  7035.          You have just seen how to retrieve all the data records, one by
  7036.     one, from the database. You may, however, want to look at certain
  7037.     records only. This is especially true when your database becomes large.
  7038.     To do this, you can start a search based on a specific document field.
  7039.     For example, you may be interested in all persons named "Smith", or all
  7040.     children aged 10, or all recipes that call for chicken, or all invoices
  7041.     with payment due dates of 01/15/90, etc. You qualify or weed out these
  7042.     records by giving the conditions that the desired records must match.
  7043.     Once you have set your search conditions, you can start a search.
  7044.  
  7045.          You specify the simplest kind of condition by entering a particular
  7046.     value in any single stored field.  You then choose "Search" from the
  7047.     Data menu to start the search based on this condition. The status
  7048.     indicators "INDEXING" or "SEARCHING" may appear at the right side of the
  7049.     status line until the search is finished. If you see the status
  7050.     indicator "NOTHING FOUND", there are no records in the database which
  7051.     match your conditions.
  7052.  
  7053.          Text field conditions are even more powerful. Typing only a few
  7054.     characters in the field will match records where the field begins with
  7055.     those characters. If the field is blank, Surefire will find all records
  7056.     sorted alphabetically by that field.  And, to make things even easier,
  7057.     case is not important in database searches.
  7058.  
  7059.          When you start a database search, Surefire will process all
  7060.     records, display the first one that matches, and display the total
  7061.     number of matching records instead of a '?'. You will learn more complex
  7062.     techniques for qualifying data records in the next chapter.
  7063.  
  7064.     Updating a Data Record
  7065.  
  7066.          Once you retrieve records from the database in one of the manners
  7067.     described above, you can change their values. You first display a record
  7068.     that needs to be corrected. After you make all desired changes, choose
  7069.     "Update Record(s)" from the Data menu or press (ALT+U). The status
  7070.     indicator "RECORD UPDATED" will appear briefly at the right of the
  7071.     status line. Your changes will be reflected the next time that record is
  7072.     displayed. Repeat this procedure for any records that need new values.
  7073.  
  7074.          If you change values in stored fields and try to leave Surefire or
  7075.     Get another document, Surefire will warn you with a message window to
  7076.     update or add the currently displayed data record. Choose YES if you
  7077.     don't care about saving the field values. Choose NO if you want a chance
  7078.     to add or update the record before moving on.
  7079.  
  7080.                           Copyright (c) 1993 Piaf, Inc.
  7081.  
  7082.     Surefire S2.0 User's Guide                                       Page 121
  7083.  
  7084.     Deleting a Data Record
  7085.  
  7086.          Normally the records you can see are active records. You can delete
  7087.     a record or make it inactive if you want Surefire to ignore it when the
  7088.     database is searched. You do this in a similar manner to the way you
  7089.     update a record. The record you wish to delete must be currently
  7090.     displayed in the document. You then choose "Delete Record(s)" from the
  7091.     Data menu or press (ALT + F5). That record will now be marked as
  7092.     inactive and will not appear the next time that records are displayed as
  7093.     a result of a search. The status indicator "RECORD DELETED" will appear
  7094.     briefly at the right of the status line.
  7095.  
  7096.          If you were currently looking at successive records (i.e. pressing
  7097.     F8, F8...), the next qualifying record will be displayed after you
  7098.     delete a record. If you delete the last record from your search, all
  7099.     fields in the document will be cleared. Likewise, if you were looking at
  7100.     records in reverse order (i.e. pressing F7, F7...), the previous
  7101.     qualifying record will be displayed. In this case, if you delete the
  7102.     first record from your search, all document fields will be cleared.
  7103.  
  7104.          Note:  In Surefire, a deleted record is actually not deleted but is
  7105.     marked inactive. This means that while these deleted records are not
  7106.     normally displayed, you may at some point access them and restore them
  7107.     to active status. You must perform a restructure operation to remove
  7108.     deleted records permanently. You will learn how to recall records and
  7109.     restructure a database later in this manual.
  7110.  
  7111.     Displaying the First and Last Records
  7112.  
  7113.          You may press (Shift+F8) and (Shift+F7) after doing a database
  7114.     search to see the last and first records of the record set. If there is
  7115.     no search in progress, Surefire will display the last and first records in
  7116.     the database (according to the Active, Inactive or All database option
  7117.     setting). Read Chapters 18 and 21 for more information.
  7118.  
  7119.  
  7120.  
  7121.  
  7122.  
  7123.  
  7124.  
  7125.  
  7126.  
  7127.  
  7128.  
  7129.  
  7130.  
  7131.  
  7132.  
  7133.  
  7134.  
  7135.  
  7136.  
  7137.  
  7138.  
  7139.                           Copyright (c) 1993 Piaf, Inc.
  7140.  
  7141.     Surefire S2.0 User's Guide                                       Page 122
  7142.  
  7143.     Chapter 18     -    Searching a Database
  7144.  
  7145.          You have already seen how to access all records one at a time from
  7146.     the database. You also know how to limit the set of records based on
  7147.     matching a single field value. Because some situations require more
  7148.     complex data filtering, Surefire allows you to specify more complex
  7149.     conditions to qualify which records are retrieved.
  7150.  
  7151.          Say you want to find all of your contacts in a certain city.
  7152.     Perhaps you would also like these records to be displayed alphabetically
  7153.     by the last name of each contact. You describe this as a query.  A query
  7154.  
  7155.     is a set of conditions that restrict the data records that are retrieved
  7156.     from the database and give a specified ordering of their display.  A
  7157.     query is used to search the database.  The records resulting from the
  7158.     search make up a record set.  You can look at or print the records in a
  7159.     record set as well as update or delete them as a group. Working with a
  7160.     record set as a group will be explained in "Chapter 21: Advanced
  7161.     Database Topics".
  7162.  
  7163.          In this chapter you will learn how to specify queries and save them
  7164.     for later use. You will also see how to display records that were
  7165.     previously "deleted".
  7166.  
  7167.  
  7168.     Specifying a Query
  7169.  
  7170.          To specify a query, first make sure you have your document in Use
  7171.     mode.  You then position the cursor on the field whose value you think
  7172.     would most limit the initial search. This is sometimes called the key
  7173.     field or the primary key.
  7174.  
  7175.          Now suppose you have about 200 contacts, most of whom live in one
  7176.     of five cities. The city field might be a good choice as the key field
  7177.     since only about 20% of your contacts are likely to live in a given
  7178.     city. Of course, any field that is stored in the database can be used as
  7179.     a key field. In fact, you may use different keys at different times
  7180.     depending on the type of record you are looking for.
  7181.  
  7182.          Once you have chosen a key field and have positioned the cursor to
  7183.     it, choose "Build Query..." from the Data menu or press (ALT + Q). This
  7184.     will open the Query window. The Query window appears as a pane at the
  7185.     top of your screen, like the Command Edit window, and does not obscure
  7186.     the document.
  7187.  
  7188.          When you specify a query in the Query window,  a 'Q' will appear in
  7189.     the status line to the left of the document name. This 'Q' means that
  7190.     you are specifying a new query. Therefore the current record set that
  7191.     you are viewing using (F7) and (F8) do not correspond to the new query.
  7192.          After you do a search based on this query (eg. by pressing ALT+S),
  7193.     the 'Q' will be replaced by an 'S'. This indicates that the database was
  7194.     searched according to the current query in the Query window and that the
  7195.     current record set now corresponds to the query.
  7196.  
  7197.  
  7198.                           Copyright (c) 1993 Piaf, Inc.
  7199.  
  7200.     Surefire S2.0 User's Guide                                       Page 123
  7201.  
  7202.     Query Lines
  7203.  
  7204.          Once you display the Query window, information about your field is
  7205.     on the first line of the window. So that we can refer to it more easily,
  7206.     let's call this a query line.   Each query line represents a single
  7207.     condition. A query can have up to 20 query lines.  As with any window in
  7208.     Surefire, you use the (Home), (End) and (left and right arrows) to move
  7209.     between query lines and query line items.  You will now learn about each
  7210.     item from left to right.
  7211.  
  7212.        Sort Order Multiple Choice Button
  7213.  
  7214.          The sort order multiple choice button can have values 1, 2 or
  7215.     blank, to indicate how the retrieved records will be sorted. Sorting  is
  7216.     the order that Surefire will use to display the records as they are
  7217.     found in the database.
  7218.  
  7219.          Initially when there is only one query line, this value is 1. That
  7220.     means, if no other conditions are added, the data will be sorted on the
  7221.     field associated with this query line.
  7222.  
  7223.          For example, if we chose the city field of a "contacts" document
  7224.     and the query said to search for all contacts, the records would be
  7225.     displayed in alphabetical order by city. That means you would see the
  7226.     records for people in Boston before those for Dallas which would be
  7227.     before those for Denver, etc.
  7228.  
  7229.          If you add another query line, you can give it a sort order of 2.
  7230.     This would mean that retrieved data records are first sorted by the
  7231.     field with the sort order 1 and then sorted by the field with a sort
  7232.     order of 2. This is called a nested sort. You may specify up to two
  7233.     levels of nesting by setting this button to the values 1 and 2 on two
  7234.     different query lines. If the choice for this button were blank, there
  7235.     would be no sort order for the associated field and the records would be
  7236.     displayed just as they are found in the database. We'll show you how to
  7237.     add query lines later.
  7238.  
  7239.          Note:  There must always be one query line with a value of 1 for
  7240.     this button.
  7241.  
  7242.          For example, say this second query line corresponds to the field
  7243.     'name' of our hypothetical "contacts" document. The records would now be
  7244.     sorted first by the city and then by the name field for each city. That
  7245.     means you would see all the records for Boston with names ordered from
  7246.     A to Z, then those for Dallas, then those for Denver, etc.
  7247.  
  7248.        Sort Direction Multiple Choice Button
  7249.  
  7250.          Generally, sorted records are retrieved in an ascending  order.
  7251.     That means that alphabetic information is ordered from A - Z, numeric
  7252.     information is ordered from 0 - 9, and dates are ordered from earliest
  7253.     to latest. Ascending order is indicated by an up arrow on the sort
  7254.     direction multiple choice button.
  7255.  
  7256.  
  7257.                           Copyright (c) 1993 Piaf, Inc.
  7258.  
  7259.     Surefire S2.0 User's Guide                                       Page 124
  7260.  
  7261.          You may, however, choose to display your data records in descending
  7262.     order. To do this, set the value of this button to a down arrow by
  7263.     pressing (Spacebar) when the cursor is on the up arrow. You may also
  7264.     press (ALT+Z) to zoom a pop-list with two choices as shown below. A
  7265.     descending sort would sort as Z - A, 9 - 0, latest to earliest, etc.,
  7266.     depending on the field type. If you were to display all contact records,
  7267.     by city, in descending order, you would first see records for Portland,
  7268.     then New York, Los Angeles, ... and lastly for Boston.
  7269.  
  7270.        Field Name and Type
  7271.  
  7272.          The next two items of the query line are the ID or name of the
  7273.     field and the field's type. This is information only and cannot be
  7274.     changed. These items provide a way to read your query more easily. They
  7275.     are especially useful if you have conditions based on fields that are
  7276.     not visible on the screen.
  7277.  
  7278.        Condition Multiple Choice Button
  7279.  
  7280.          This multiple choice button indicates more specifically the way a
  7281.     data record will be tested against a value. The values of this button
  7282.     depend on the type of field associated with the query line. Also,
  7283.     depending on the field type, you can cycle through single and range
  7284.     conditions. Single conditions accept one value while range conditions
  7285.     accept two values.
  7286.  
  7287.        Single Conditions
  7288.  
  7289.          When the condition multiple choice button is set to accept a single
  7290.     value, one data entry field is provided just to the right of the button.
  7291.  
  7292.     This field is the same type as the field associated with the query line.
  7293.     For example, if the condition is for a date, this would be a date field.
  7294.     If this is a numeric condition, this field accepts a numeric value, and
  7295.     so on. As with all multiple choice buttons in windows, you can press
  7296.     (Spacebar) to see each possible value or press (ALT + Z) to see a
  7297.     pop-list of all values.  With single condition query lines you can limit
  7298.     the search of your data in many ways according to a specific value that
  7299.     you enter.
  7300.  
  7301.          The tables here and on the next page list the single conditions for
  7302.     all data types:
  7303.  
  7304.             text field conditions     numeric field conditions
  7305.  
  7306.               Is Exactly               Equal to
  7307.               Begins With              GT (greater than)
  7308.               Contains                 GT or Eq (greater than or equal to)
  7309.               All                      LT (less than)
  7310.               Is Not                   LT or Eq (less than or equal to)
  7311.               Does Not Begin With      All
  7312.               Does Not Contain         Not Equal to
  7313.  
  7314.  
  7315.  
  7316.                           Copyright (c) 1993 Piaf, Inc.
  7317.  
  7318.     Surefire S2.0 User's Guide                                       Page 125
  7319.  
  7320.             date field conditions     logical field conditions
  7321.  
  7322.               On
  7323.               After
  7324.               On or After
  7325.               Before
  7326.               On or Before             Only Y
  7327.               All                      Only N
  7328.               Not On                   All
  7329.  
  7330.  
  7331.        The 'All' Condition
  7332.  
  7333.          Text, numeric and date fields may have the special condition 'All'.
  7334.     The 'All' condition does not have an associated data entry field. It
  7335.     indicates, however, that it doesn't matter what the value of the field
  7336.     is in the data record.  You choose 'All' when you want to display data
  7337.     records that are sorted on a field but have no particular value for this
  7338.     field.
  7339.  
  7340.          For example, you may want to view all of your contact records
  7341.     sorted by date of the last letter that you sent.  If you had 'All' and
  7342.     an ascending sort on the date sent, Surefire would first display the
  7343.     person who you've been out of contact with the longest.  Alternatively,
  7344.     if you had 'All' and a descending sort on the date sent, you would first
  7345.     see the person to whom you most recently sent a letter. 'All' is used in
  7346.     a similar fashion with both text and numeric fields.
  7347.        Range Conditions
  7348.  
  7349.          Range conditions are available for numeric and date fields. They
  7350.     indicate that the records you are interested in have values that fall
  7351.     into some range. There are two data entry fields associated with a range
  7352.     condition that allow you to give the top and bottom of the range. For
  7353.     example you may want to find all of your clients between the ages of 35
  7354.     and 50. Or, you may want to send a follow-up letter to everyone with
  7355.     whom you spoke between May and July. As with single conditions, these
  7356.     fields are the same data type as the associated field of your document.
  7357.  
  7358.          Range conditions for numeric and date fields are listed below:
  7359.  
  7360.                       Numeric Field Range Conditions
  7361.  
  7362.          Both GT  condition1   and LT  condition2
  7363.          Both GT or Eq  condition1   and LT or Eq  condition2
  7364.          Both GT or Eq  condition1   and LT  condition2
  7365.          Both GT  condition1   and LT or Eq  condition2
  7366.  
  7367.                       Date Field Range Conditions
  7368.          Both After  date1  and Before  date2
  7369.          Both On or After  date1  and On or Before  date2
  7370.          Both On or After  date1  and Before  date2
  7371.          Both After  date1  and On or Before  date2
  7372.  
  7373.  
  7374.  
  7375.                           Copyright (c) 1993 Piaf, Inc.
  7376.  
  7377.     Surefire S2.0 User's Guide                                       Page 126
  7378.  
  7379.        Adding a Query Line
  7380.  
  7381.          When you first display the Query window, it contains a single query
  7382.     line corresponding to the document field on which you selected "Build
  7383.     Query". The initial condition echoes the value that was in the field at
  7384.     the time. The condition multiple choice is set to indicate equivalence,
  7385.     that is, "Is Exactly", "Equal to", or "On" depending on the type of the
  7386.     field.  The sort order is 1 and the sort direction is ascending as
  7387.     indicated by the up arrow. You may change these button values prior to
  7388.     doing a search.
  7389.  
  7390.          Once the Query window is open, you may add other conditions. The
  7391.     more query lines there are, the more restrictive the search will be and
  7392.     the fewer records that will be displayed. You add query lines by
  7393.     temporarily moving the cursor back to the document and selecting
  7394.     additional fields for the conditions. Once there are query lines for
  7395.     these fields, the various multiple choice buttons and values in the
  7396.     Query window may be changed as desired.
  7397.  
  7398.          The procedure for adding query lines is similar to that for adding
  7399.     cell references to the edit area of the Command Edit window.  After the
  7400.     Query window is open, you move to the document by pressing (Shift + Tab)
  7401.     and then move around using the usual keys for movement by fields, (End)
  7402.     and (Home).  You move to any text, numeric, date or logical field.
  7403.     Then, press (Ctrl + Enter) to make a new query line for that field.  You
  7404.     may select other fields this way, or return directly to the Query window
  7405.     by pressing (Shift+Tab) again.
  7406.  
  7407.          You move around the Query window with multiple query lines by using
  7408.     the (End), (Home) and the (up and down arrows). You will notice that as
  7409.     you move from one query line to another, the corresponding document
  7410.     field will be highlighted. If needed, Surefire will automatically scroll
  7411.     the document so that you can see this field.
  7412.  
  7413.          Note: You may define up to 20 query lines (i.e. conditions) for a
  7414.     query.
  7415.  
  7416.        AND'ed Conditions
  7417.  
  7418.          For every different field selected, the conditions will be AND'ed
  7419.     to each other.  That is, the data records will be retrieved if they
  7420.     match all of the conditions in the query. For example, you may want to
  7421.     display all clients who are in Dallas AND whose name begins with "Gr".
  7422.  
  7423.        OR'ed Conditions
  7424.  
  7425.          If you create two query lines for the same field, the resulting
  7426.     conditions will be OR'ed together. That means that a record must match
  7427.     either the value in the first such query line OR the value in another
  7428.     query line for that field. Say you want to change your query to get all
  7429.     persons who either live in Dallas OR Los Angeles and whose name begins
  7430.     with 'Gr'.
  7431.  
  7432.  
  7433.  
  7434.                           Copyright (c) 1993 Piaf, Inc.
  7435.  
  7436.     Surefire S2.0 User's Guide                                       Page 127
  7437.  
  7438.        Deleting a Query Line
  7439.  
  7440.          By continuing to add conditions, a query can become quite complex
  7441.     and restrictive. At some point, you may decide that a condition is no
  7442.     longer needed. To remove a condition, simply place the cursor anywhere
  7443.     on that query line and press (Ctrl+D). You may delete any query line
  7444.     with the following exception:
  7445.  
  7446.          You may not delete a query line with the sort order 1 if there are
  7447.     no OR'ed conditions for that query line and there is no query line with
  7448.     a sort order of 2.
  7449.  
  7450.          If you delete a query line with sort order 1, and there is an OR'ed
  7451.     query line for the same field, that OR'ed query line will become the
  7452.     primary key. If there is no OR'ed query line but there is a query line
  7453.     with a sort order of 2, that query line will be the primary key.
  7454.  
  7455.        Closing the Query Window
  7456.  
  7457.          When you have added all the conditions that you want in the Query
  7458.     window, you can close it by pressing (Esc). This gives back the full
  7459.     screen to the document but will not erase the contents of the Query
  7460.     window. You will still know that there is a query defined by the 'Q' or
  7461.     'S' in the status line to the left of the document name. An 'S' will
  7462.     replace the 'Q' when the current record set was obtained using the
  7463.     currently specified query.
  7464.  
  7465.          When you start a search, the query defined in the Query window will
  7466.     be used even if the Query window is not visible.  Once you have defined
  7467.     a query in the Query window and you have not cleared it, choosing "Build
  7468.     Query... " from the Data menu will display the Query window with the
  7469.     most recently defined conditions.
  7470.  
  7471.        Clearing the Current Query
  7472.  
  7473.          To start a totally new query, you must first clear the current
  7474.     query. You do this by selecting "Clear Query " from the Data menu or
  7475.     pressing (ALT+K). You have already done this a few times in your
  7476.     practices. The 'Q' (or 'S' if a search is in progress) will disappear
  7477.     from the status line. The next time you open the Query window, the
  7478.     window will contain a single query line which corresponds to the current
  7479.     field of the document. This will be just like the first time you opened
  7480.     the Query window.
  7481.  
  7482.  
  7483.     Setting Search Options
  7484.  
  7485.          Surefire uses some default parameter settings that limit how a
  7486.     search is done and how data is displayed in the document. To change
  7487.     these settings, select "Set Search Options..." from the Data menu. A
  7488.     window will appear that allows you to change these parameters as
  7489.     described below. Any changes that you make will effect subsequent
  7490.     searches.
  7491.  
  7492.  
  7493.                           Copyright (c) 1993 Piaf, Inc.
  7494.  
  7495.     Surefire S2.0 User's Guide                                       Page 128
  7496.  
  7497.        Setting the Record Type
  7498.  
  7499.          Normally only active (i.e. not deleted) qualifying records are
  7500.     retrieved during a search. If you want the search to include deleted
  7501.     records also, or to be limited to only deleted records, you must change
  7502.     the multiple choice button to the right of the text "Record Type for
  7503.     Search". This button can have the values: "Active", "Deleted", and "
  7504.     All".  Select the option that you desire, then choose OK.
  7505.  
  7506.          The next time you search the database, the new setting will be
  7507.     effective. If you had chosen "Deleted" or "All", you may see a 'D' at
  7508.     the far right of the status line as you display each record with (F8).
  7509.     This indicates that the currently displayed record was deleted at some
  7510.     prior time. You may later recall  a deleted record.  Recalling deleted
  7511.     records is discussed in "Chapter 21: Advanced Database Topics".
  7512.  
  7513.          The "Do Report Formatting?" option is fully described in "Chapter
  7514.     22: Generating Reports".
  7515.  
  7516.  
  7517.     Named Queries
  7518.  
  7519.          After taking pains to construct a complex query that has many
  7520.     conditions, you may want to save those conditions to use again at
  7521.     another time. These could be queries that are run often such as:
  7522.  
  7523.          1. Show me all my accounts that are past due.
  7524.          2. Find the top earning salesman of the month.
  7525.          3. Show all contacts sorted by zip code.
  7526.  
  7527.          Once a query has been built in the Query window, you may save it
  7528.     for later use. This named query will always be associated with the
  7529.     current document until you decide to delete it. Once saved, you can
  7530.     edit, copy, run or delete the query. To do any of these operations,
  7531.     select "Edit Queries..." from the Data menu. You will see the Edit Query
  7532.     window. This window contains one multiple choice button and one data
  7533.     entry field. You may view the possible values for this button by
  7534.     pressing (ALT+Z) to zoom the button choices.
  7535.  
  7536.        Saving a Query
  7537.  
  7538.          A named query which will be associated with a document must first
  7539.     be given its name. Just as with a new document, you give the query a
  7540.     name when you choose to save it. To save a query, set the button value
  7541.     to "Save Current Query" and enter a name in the data entry field.  You
  7542.     can use a name of up to 10 characters to help you remember what the
  7543.     query does. For example, PASTDUACCT, TOPSELLER and MAINCONTAC might work
  7544.     for the sample conditions above. You then choose OK. The save will not
  7545.     affect the Query window. Since Surefire remembers the query information
  7546.     until you delete the query, you can access this query whenever needed.
  7547.  
  7548.          If you want to see the names of queries already defined for the
  7549.     current document, press the Zoom key (ALT + Z) when the cursor is in the
  7550.     data entry field.
  7551.  
  7552.                           Copyright (c) 1993 Piaf, Inc.
  7553.  
  7554.     Surefire S2.0 User's Guide                                       Page 129
  7555.  
  7556.          Note:   During save, be careful not to choose a name from the
  7557.     pop-list, since Surefire will now overwrite the query that was
  7558.     associated with that name.
  7559.  
  7560.        Getting a Query
  7561.  
  7562.          Once you save a query, you may bring it back to review it, copy it,
  7563.     or to change it. First, you need to get the query.  You can get any
  7564.     query that was previously saved for the current document. If the Query
  7565.     window is visible, this named query will replace the window contents
  7566.     with its saved conditions. If the Query window is not visible, it will
  7567.     be displayed with the query lines of the named query that you just got.
  7568.  
  7569.          When the named query is displayed in the Query window, you can make
  7570.     changes to it. These changes will not become part of the named query
  7571.     unless you re-save the query. When you do a search, the conditions of
  7572.     the named query, along with your changes, will be used to restrict the
  7573.     search. The name of the query is displayed at the top of the window.
  7574.  
  7575.          Note:   Any unnamed query that was in the Query window before you
  7576.     did a Get Query, will be lost.
  7577.  
  7578.          Sometimes you may want to have a second query that is very similar
  7579.     to one you already have saved. You can quickly create this second query.
  7580.     First get the similar query. Now, make your desired changes and use the
  7581.     "Save Current Query" option to provide a different name.
  7582.  
  7583.        Running a Query
  7584.  
  7585.          If you want to use a named query to limit your data search, without
  7586.     opening or changing the contents of the Query window, you may run  the
  7587.     query. To do this choose the Run Query option from the Edit Query
  7588.     window. Then, enter the name in the data entry field or use the pop-list
  7589.     to choose a name and choose OK. A search will be started immediately
  7590.     based on the conditions of the named query.
  7591.  
  7592.        Delete a Query
  7593.  
  7594.          Because there are a limited number of named queries per document,
  7595.     you may at some point want to delete queries that you no longer need. To
  7596.     do this, choose the Delete Query option from the Edit Query window.
  7597.     Then, type or choose the name of the query that you want deleted and
  7598.     choose OK. Surefire will ask you if you really want to go ahead with the
  7599.     delete operation. If you decide to proceed, that query will no longer be
  7600.     available.
  7601.  
  7602.  
  7603.  
  7604.  
  7605.  
  7606.  
  7607.  
  7608.  
  7609.  
  7610.  
  7611.                           Copyright (c) 1993 Piaf, Inc.
  7612.  
  7613.     Surefire S2.0 User's Guide                                       Page 130
  7614.  
  7615.     Scrolling the Query Window with the Mouse
  7616.  
  7617.          The Query window may contain up to 20 query lines, though only 3
  7618.     lines are displayed at a time. Arrows at the right side of the window
  7619.     tell whether there are more lines to be displayed. A down arrow indicates
  7620.     that there are more lines below the currently displayed lines while an up
  7621.     arrow indicates that there are more lines above. Both arrows may be
  7622.     displayed at the same time. To scroll the Query window with the mouse,
  7623.     Hold the left mouse button while the mouse cursor is positioned on one
  7624.     of these arrows. The window will scroll in the direction of the arrow
  7625.     displaying other query lines.
  7626.  
  7627.  
  7628.  
  7629.  
  7630.  
  7631.  
  7632.  
  7633.  
  7634.  
  7635.  
  7636.  
  7637.  
  7638.  
  7639.  
  7640.  
  7641.  
  7642.  
  7643.  
  7644.  
  7645.  
  7646.  
  7647.  
  7648.  
  7649.  
  7650.  
  7651.  
  7652.  
  7653.  
  7654.  
  7655.  
  7656.  
  7657.  
  7658.  
  7659.  
  7660.  
  7661.  
  7662.  
  7663.  
  7664.  
  7665.  
  7666.  
  7667.  
  7668.  
  7669.  
  7670.                           Copyright (c) 1993 Piaf, Inc.
  7671.  
  7672.     Surefire S2.0 User's Guide                                       Page 131
  7673.  
  7674.     Chapter 19     -    Sharing Data Among Documents
  7675.  
  7676.          Once you start using a database, you may find it useful to access
  7677.     the same data in another way through a different document. Suppose you
  7678.     need to send a thank-you letter to many of the clients in your contacts
  7679.     database. The letter would have fields for name, address, city, state
  7680.     and salutation.  Wouldn't it be nice to share the same data that you
  7681.     already have in your contacts database instead of having to type this
  7682.     information all over again for each letter?  Or suppose you simply
  7683.     wanted to list your contacts and their phone numbers, like in a phone
  7684.     book. Wouldn't it be nice to again use the same data from the contacts
  7685.     database?
  7686.  
  7687.          In Surefire, you can construct Smart documents for the thank-you
  7688.     letter and phone book to project information from the contacts document.
  7689.     This means you can access data from the contacts document, with a
  7690.     totally different context, from a completely separate document. The
  7691.     fields from these new documents would be linked to some of the fields of
  7692.     the contacts document.  This linkage is achieved by projecting fields
  7693.     from one document to another. With projection, you can link any two
  7694.     documents together as long as one of the documents defines a database.
  7695.     The result is that the second document has a different view of the
  7696.     database than the original one.
  7697.  
  7698.          The notion of projection is the key to sharing data among Surefire
  7699.     documents. It will allow you to perform mail-merge operations and
  7700.     generate succinct reports from a database. In this chapter you will
  7701.     learn how to project fields from one document to another and thus enable
  7702.     this sharing to take place.
  7703.  
  7704.     Base Documents vs Projected Documents
  7705.  
  7706.          A document that defines a database is called a base document.  Our
  7707.     "contacts" document is a base document. A document that projects
  7708.     information from a base document is called a projected document.  The
  7709.     thank-you letter and contact list are examples of projected documents.
  7710.     You can use a projected document when you want to see only a portion of
  7711.     a data record whose fields are defined in a base document or when you
  7712.     want to see all the information in a different way.
  7713.  
  7714.          You can look at the exact same data records in your thank-you
  7715.     letter as you do in "contacts". In fact, you can do all the same
  7716.     searching operations through the letter as you would in "contacts".
  7717.  
  7718.          As you can see, projection is a very powerful and convenient idea.
  7719.     Projected documents are often used to support Mail Merge applications
  7720.     (see "Chapter 20: Forms and Form Letters") and to produce formatted
  7721.     reports (see "Chapter 22: Report Generation").
  7722.  
  7723.  
  7724.  
  7725.  
  7726.  
  7727.  
  7728.  
  7729.                           Copyright (c) 1993 Piaf, Inc.
  7730.  
  7731.     Surefire S2.0 User's Guide                                       Page 132
  7732.  
  7733.     Projected Fields
  7734.  
  7735.          Earlier in this manual we introduced the concept of a field's data
  7736.     attribute.  In the simplest sense the data attribute determines whether
  7737.     a field is stored in a database or not. When you first created fields in
  7738.     the property lease, this attribute was set to Not Stored. Later you
  7739.     changed some of these fields to be Stored so that you could add a record
  7740.     and create a database. Well, a projected field is also stored, however
  7741.     its value is stored in a different document from the document that
  7742.     contains the field. When a field is projected it has the data attribute
  7743.     "Projected".
  7744.  
  7745.          Let's now take a closer look at the letter document. While most of
  7746.     the fields are projected from the contacts document, the date field is
  7747.     not. In fact, this date is set to default to today's date.  Documents
  7748.     that contain projected fields may also have other fields that are not
  7749.     projected. It is often very useful to have fields that contain the
  7750.     result of an operation based on the projected fields. Multiplying
  7751.     current sales figures by a growth rate to forecast next year's sales is
  7752.     only one example.
  7753.  
  7754.          Note:  Any number of documents may share data from one base
  7755.     document.  However, a document can not have both stored fields and
  7756.     projected fields at the same time. That means that once a document has
  7757.     one field that is Projected, it may have no fields that are Stored.
  7758.     Conversely, once a document has a Stored field, it may have no fields
  7759.     that are Projected. Surefire will warn you with a message window if you
  7760.     try to make an invalid projection.
  7761.  
  7762.          Now let's move on and explore two ways in which you can project
  7763.     fields. You will be surprised how easy it is to do.
  7764.  
  7765.        Projecting Fields Using the Clipboard
  7766.  
  7767.          You can easily project a field interactively by following a
  7768.     procedure that is very similar to the combined operations of Copy and
  7769.     Paste. First you edit the document that defines the fields you want
  7770.     projected. Then you use Block or Line Selection to select the portion of
  7771.     your document that contains the fields you want projected.  Now, instead
  7772.     of choosing Copy or Cut, you choose "Project" from the Data menu. The
  7773.     fields and surrounding text are copied to the Clipboard. You then Get
  7774.     the destination document (or create a new document) and Paste the
  7775.     clipboard object.  That's all there is to it. Even without saving the
  7776.     document, you can immediately use it and access the database!
  7777.  
  7778.          As with copying fields between documents, the only information that
  7779.     comes along with projected fields are the fields' types and format
  7780.     attributes. Commands in the original fields will not be preserved in the
  7781.     projected fields. Surefire will automatically assign new field IDs. If
  7782.     you want to give these fields appropriate user names, you may do so via
  7783.     the Command Edit window (see "Chapter 15: Using Field Commands").  Now
  7784.     let's look at another way to specify projected fields.
  7785.  
  7786.  
  7787.  
  7788.                           Copyright (c) 1993 Piaf, Inc.
  7789.  
  7790.     Surefire S2.0 User's Guide                                       Page 133
  7791.  
  7792.        Projection as a Field Attribute
  7793.  
  7794.          You have seen that a field can be either stored in a database or
  7795.     projected  from a database defined by some other document.  A field's
  7796.     data attribute determines whether a field is stored in some database or
  7797.     not at all. You can use the Field Create and Field Modify windows to set
  7798.     the value of a field's data attribute.
  7799.  
  7800.          There may be times when you want to project fields by setting the
  7801.     field's data attribute directly. If you set the value of the data
  7802.     attribute multiple choice button to Projected in either of the above
  7803.     windows, you will see two additional fields. These fields allow you to
  7804.     enter the name of another document and the name of some field in that
  7805.     document. Once you enter the name of a base document in the "Document:"
  7806.     field, you can move to the "Field:" field and press (ALT+Z) to see a
  7807.     pop-list of valid fields. If the field is already projected, the window
  7808.     will indicate the correct base document and field.
  7809.  
  7810.          Note: If you project a field using this approach, and the projected
  7811.     field is smaller than the original field, your data may be truncated
  7812.     when viewed through the projected document.  On the other hand, if the
  7813.     new field is larger, the excess space is appropriately padded. Any
  7814.     truncation that occurs will not affect the actual data stored in the
  7815.     database.
  7816.  
  7817.        Using Projected Fields vs Original Fields
  7818.  
  7819.          You may resize projected fields at any time. When they are made
  7820.     smaller, truncation will occur when you view the data. When they are
  7821.     enlarged, they will be padded appropriately. It is important to note,
  7822.     however, that adding data to a database through a projected field which
  7823.     is bigger than the corresponding field in the base document will result
  7824.     in the database truncating the value to the size of the field in the
  7825.     base document.
  7826.  
  7827.          While you may add records to a database using projected documents,
  7828.     these records will generally be missing some information. Say you added
  7829.     contact information to the contacts database using the letter. Because
  7830.     the letter only has fields for name, address and salutation, the other
  7831.     information such as phone number and age will be missing for this
  7832.     contact. You can fill it in at a later time by updating the appropriate
  7833.     database record using the contacts document itself.
  7834.  
  7835.  
  7836.     Searching in a Projected Document
  7837.  
  7838.          Generally, you build queries using projected documents following
  7839.     the same steps that you use for base documents. However, there are two
  7840.     important differences that you need to be aware of:
  7841.  
  7842.          1.   If you build your query from fields that are projected from
  7843.          another document, the field name or ID that will appear on a query
  7844.          line is the name or ID of the field in the base document.
  7845.  
  7846.  
  7847.                           Copyright (c) 1993 Piaf, Inc.
  7848.  
  7849.     Surefire S2.0 User's Guide                                       Page 134
  7850.  
  7851.          2.   Very often, your projected document will not have all the
  7852.          fields that exist in the base document. However, you may want to do
  7853.          your query based on some of the fields that are not in the current
  7854.          document. For example, suppose you have a letter with projected
  7855.          fields for name, address and salutation. You now would like to send
  7856.          this letter to all contacts over the age of 30.  But age does not
  7857.          appear in the letter, so how do you target your clients with this
  7858.          condition?
  7859.  
  7860.          To do this, you open the Query window by choosing a projected field
  7861.          to give the initial query line. Then, you press (Ctrl+Z). This will
  7862.          display a pop-list of all database fields in the base document,
  7863.          including those that are not projected in the current document. If
  7864.          you choose one of these fields, a query line will be created for
  7865.          that field. This field may have no corresponding field in the
  7866.          current document. Or, this may be a field on a different page which
  7867.          is not currently visible.
  7868.  
  7869.          You may now change the new query line to the condition that you
  7870.          want. If you make this field the primary key, you may remove the
  7871.          query line of the field with which you initially opened the Query
  7872.          window. To do this, move the cursor to the line and press (Ctrl+D).
  7873.  
  7874.  
  7875.          In the next chapter you will use what you have learned about
  7876.     projections to do the very common tasks of generating form letters and
  7877.     mailing labels.
  7878.  
  7879.  
  7880.     Printing Your Data
  7881.  
  7882.          Sometimes you will use a Surefire document to review information on
  7883.     your screen. Often, you may want to print some of this information. Up
  7884.     until now you have seen how to view only one record at a time. The
  7885.     following sections discuss two ways of printing your one-at-a-time data
  7886.     records.  The first method allows you to decide very specifically which
  7887.     of your qualified records to print. The second method allows you to
  7888.     print all of your qualifying records without any intervention.
  7889.  
  7890.          In "Chapter 22: Generating Reports", you will see how to view and
  7891.     print information from more than one record at a time.
  7892.  
  7893.        Printing the Current Record
  7894.  
  7895.          No matter how you search for your data, you can always print the
  7896.     document for the currently displayed record.  In fact, you can review
  7897.     each record and print only those that you wish.  Suppose you just did a
  7898.     search in your contacts database for everyone who lives in New York.
  7899.     You can now go through these records using (F8) and (F7). As you do, you
  7900.     selectively print the ones that you expect to contact while you are in
  7901.     New York on business.
  7902.  
  7903.  
  7904.  
  7905.  
  7906.                           Copyright (c) 1993 Piaf, Inc.
  7907.  
  7908.     Surefire S2.0 User's Guide                                       Page 135
  7909.  
  7910.          Sometimes it may be handy to write a note about a specific contact
  7911.     right on the contact record.  You do this by switching to Text edit
  7912.     mode, editing the text, and then printing that record.  You can then
  7913.     switch back to using the document to view other records. Before you can
  7914.     use the document again two message windows will be displayed.  Just
  7915.     choose YES on both of them.
  7916.  
  7917.        Printing All Qualifying Records
  7918.  
  7919.          Often, you may want to print all the records resulting from a query
  7920.     without reviewing each record as it is retrieved. This may occur if you
  7921.     are running a mail-merge operation where the result will be many letters
  7922.     or mailing labels, each one being composed from a different database
  7923.     record. To tell Surefire that you want this to occur, you must first
  7924.     build a query or Get a named query. You then use a special feature of
  7925.     the Print window to start a Search & Print operation.
  7926.  
  7927.          Surefire will qualify matching records according to the query
  7928.     conditions, retrieve each record into your document and print that
  7929.     instance of the document. Adjustments will be made for autosized fields
  7930.     as well. Since this feature is most often used during form letter
  7931.     generation, a full discussion will be deferred to the next chapter -
  7932.     "Forms and Form Letters".
  7933.  
  7934.  
  7935.  
  7936.  
  7937.  
  7938.  
  7939.  
  7940.  
  7941.  
  7942.  
  7943.  
  7944.  
  7945.  
  7946.  
  7947.  
  7948.  
  7949.  
  7950.  
  7951.  
  7952.  
  7953.  
  7954.  
  7955.  
  7956.  
  7957.  
  7958.  
  7959.  
  7960.  
  7961.  
  7962.  
  7963.  
  7964.  
  7965.                           Copyright (c) 1993 Piaf, Inc.
  7966.  
  7967.     Surefire S2.0 User's Guide                                       Page 136
  7968.  
  7969.     Chapter 20     -    Forms and Form Letters
  7970.  
  7971.          Suppose you have a letter that introduces your new product and you
  7972.     would like to send it to all your clients in a particular region of the
  7973.     country. However, you want to send more personal letters to your best
  7974.     customers. Before the integration of word-processing and database
  7975.     features this was a tedious task. You had to sit at a typewriter with
  7976.     the index cards for these clients in hand, and to type each copy of the
  7977.     letter with the appropriate names and addresses each time. Then, you had
  7978.     to type the names and addresses again on the envelopes.
  7979.  
  7980.          Other tedious and repetitious tasks include invoices, contracts,
  7981.     leases, sales agreements, order forms and reports that are done
  7982.     periodically.  This includes all the standard pre-printed forms, which
  7983.     require you to "fill in the blanks", that you can buy at your local
  7984.     stationery store.  All of these everyday examples require you to enter
  7985.     specific information into portions of a document.
  7986.  
  7987.          Many software packages available today offer some way to merge data
  7988.     into your word processed documents while they are being printed.
  7989.     However, you need to learn new concepts that are specific to these merge
  7990.     operations. And most require the use of cryptic codes and special files
  7991.     that have to be set up just right to work. This is usually referred to
  7992.     as mail-merge or merge printing.
  7993.  
  7994.          In Surefire, there is no separate mechanism for specifying data
  7995.     files, no cryptic merge commands and no new concepts to learn. Combining
  7996.     text, data and calculations within a document, in a natural-to-use way,
  7997.     is the basic idea behind Surefire. So, setting up to generate form
  7998.     letters, mail labels, envelopes and pre-printed forms is no different
  7999.     than composing a Smart document for a specific purpose.
  8000.  
  8001.          This chapter shows the various ways Surefire can produce form
  8002.     letters, mail labels, envelopes and pre-printed forms by using some of
  8003.     the basic concepts already discussed in this User's Guide.
  8004.  
  8005.     What You Need to Know
  8006.  
  8007.          To conveniently produce forms or letters you need to create a Smart
  8008.     document for your specific task.  After you have the right Smart
  8009.     document, generating the forms or letters on you printer is a simple
  8010.     matter. The first thing you do is to specify a query using the Query
  8011.     window. Then, using the Print window you select Search & Print. Surefire
  8012.     will retrieve each record according to your query, put it in the
  8013.     document, do autosizing where specified and print. You will enjoy seeing
  8014.     each form or letter composed on the screen and be able to stop the
  8015.     process if you need to.
  8016.  
  8017.          There are three flavors of Smart documents that may apply. The
  8018.     creation and use of these Smart documents have already been described
  8019.     completely in previous chapters. We will discuss them here as they
  8020.     relate specifically to forms and form letters. We will first look at the
  8021.     differences between them and for what purposes each of them is best
  8022.     suited.
  8023.  
  8024.                           Copyright (c) 1993 Piaf, Inc.
  8025.  
  8026.     Surefire S2.0 User's Guide                                       Page 137
  8027.  
  8028.        Documents with Fields and No Database
  8029.  
  8030.          This type of document allows you to quickly find and enter data
  8031.     into the specific places you need to fill in.  This is done through the
  8032.     simple use of fields. These fields may also be used to allow your input
  8033.     to be only a date or a number. In addition, fields can be set to
  8034.     automatically size according to the text that surrounds it. You can also
  8035.     perform calculations automatically as you make entries.
  8036.  
  8037.          To produce multiple documents of this type you fill in the blanks
  8038.     and print. Then you clear the fields, fill in the blanks again and print
  8039.     again. Your typing is reduced to the minimum and each version comes out
  8040.     perfect on the printer.
  8041.  
  8042.          This method is very useful but it assumes you will never expect to
  8043.     re-use the information you've typed in. Once you've printed the document
  8044.     and cleared the fields, the paper version is the only version you have.
  8045.     In some cases, this may be exactly what you want.
  8046.  
  8047.          If you want to keep the data along the way, just set up your
  8048.     document to have stored fields. This is the second flavor below.
  8049.  
  8050.        Documents with Stored Fields
  8051.  
  8052.          A document with stored fields is a document with a database. It can
  8053.     be set up just like the one described above, but the data can be saved
  8054.     while its being entered. All you need to do is to make sure you are
  8055.     using stored fields.
  8056.  
  8057.          Now it becomes easy to do a lot of exciting and powerful things.
  8058.     You can first type in all the information at once and then print it all.
  8059.     You have all the data already entered, so later you can change the form
  8060.     or letter and print the whole set again. Or, you can print only a
  8061.     portion of the set.
  8062.  
  8063.          Not only that, unlike other systems that do merge printing, you
  8064.     only need to work with one document. The same document that you print
  8065.     from is the same document you enter data into and the same document you
  8066.     can change when needed. There are no separate files that have to be
  8067.     merged.
  8068.  
  8069.          Since your Smart document now has a database, you can access it to
  8070.     find a specific person's address, use it for reference and even extend
  8071.     the information you are collecting. You now have all the power of a
  8072.     database. And, you can interact with your data directly through the form
  8073.     letter or form you've created.
  8074.  
  8075.  
  8076.  
  8077.  
  8078.  
  8079.  
  8080.  
  8081.  
  8082.  
  8083.                           Copyright (c) 1993 Piaf, Inc.
  8084.  
  8085.     Surefire S2.0 User's Guide                                       Page 138
  8086.  
  8087.        Documents with Projected Fields
  8088.  
  8089.          A document with projected fields allows you to access information
  8090.     from the database of another document. With this, you can do two things.
  8091.     First, you can access data through a subset of all the fields that were
  8092.     defined in the original document. Secondly, it gives you a way to keep
  8093.     multiple letters or forms, ready to go, all accessing the same database.
  8094.     Product announcements, follow-up letters and order forms can all share
  8095.     the same database, eliminating the redundant entry and duplication of
  8096.     information.  And don't forget, you can create buttons for immediate
  8097.     access to your documents to build your own integrated application.
  8098.  
  8099.          Projected documents are very easy to create. The easiest way is to
  8100.     use the Clipboard to copy the portions of your original document along
  8101.     with the appropriate fields. Paste the copied portion to a new document,
  8102.     edit the new document to be the way you want, save it, then start using
  8103.     it. When you've done this once, you will realize there can be no easier
  8104.     way.
  8105.  
  8106.          Now we will take you through a few practices to show you just how
  8107.     it is done. You will see specific examples for form letters, mailing
  8108.     labels and envelopes. You will also see how to set things up for a
  8109.     pre-printed form.
  8110.  
  8111.  
  8112.     Mailing Labels
  8113.  
  8114.          Mailing labels, form letters and envelopes are all very similar in
  8115.     that they are primarily made up of the names and addresses of people
  8116.     whom you contact. With one "contacts" database you can easily generate
  8117.     mailing labels and the other stationery from the same data.
  8118.  
  8119.          Keep in mind, however, that if all you want to do is make labels,
  8120.     the process is very simple.  If you just have a few to do, set your page
  8121.     format for mailing labels and type in the text for as many labels as you
  8122.     need. When you're finished, just print the document.  As an alternative
  8123.     method, just create a label document with stored fields and enter the
  8124.     names and addresses directly.  Since this becomes a database, you can
  8125.     use "Search & Print" to generate the labels that you want.
  8126.  
  8127.          You can easily create mailing labels for your contacts database by
  8128.     doing the following:
  8129.  
  8130.          1.  Edit your contacts document.
  8131.          2.  Project the fields.
  8132.          Use Block Select from the Edit menu to select the name, company and
  8133.          address fields. Choose Project from the Data menu. Press (F6) to
  8134.          hide the clipboard object. Now Block select the city, state and
  8135.          zipcode fields. This time take some of the text with it. You will
  8136.          be able to delete it later. Choose Project again from the Data
  8137.          menu. Press (F6) to hide the second clipboard object.
  8138.  
  8139.          3.  Choose New from the File menu to clear the document for a new
  8140.          mailing label document.
  8141.  
  8142.                           Copyright (c) 1993 Piaf, Inc.
  8143.  
  8144.     Surefire S2.0 User's Guide                                       Page 139
  8145.  
  8146.          4.  Paste the projected clipboard objects.
  8147.          View both clipboard objects by pressing (Shift + F6). Use the
  8148.          (Shift + Tab) key to select the first clipboard object. Move the
  8149.          object with the name, company and address to the upper left corner
  8150.          of the page and paste it by pressing (ALT+F3). Paste the remaining
  8151.          object below it. Now remove any unwanted text such as "state:",
  8152.          "zip", etc, by using the (Delete) key. Type in a comma ',' between
  8153.          the city and the state.
  8154.  
  8155.          5. Change the format for mailing labels.
  8156.          Choose "Format..." from the Page menu to open the Format window.
  8157.          Press (ALT+Z) to zoom the page sizes and choose "mailing labels".
  8158.          Make sure the margins are all set to zero. Choose OK to set this
  8159.          new format. The page size is actually a bit wider than 3 1/2 inches
  8160.          to accommodate the autosizing of certain fields.
  8161.  
  8162.          Notice that the bottom and right parts of the screen are shown with
  8163.          the same shading as a page break. This is because a mailing label
  8164.          is a very small page; not even as big as the screen.
  8165.  
  8166.          6.  Save the document with a name such as "labels".
  8167.  
  8168.  
  8169.        Printing Mailing Labels
  8170.  
  8171.          You will now see how to print mailing labels for all of your
  8172.     contacts ordered alphabetically by state.  Before you start printing,
  8173.     make sure that you have loaded your printer with the appropriate stock
  8174.     for the type of document you are printing. For mailing labels, use the
  8175.     single column 3-1/2 by 1 inch labels. Now follow this procedure:
  8176.  
  8177.          1.  Do a trial print.
  8178.          Get the your "labels" document and view any record by typing (F8).
  8179.          Choose Print from the Print window to just print the current
  8180.          record. Make sure that the printed text lines up well with the
  8181.          label.  If not, make the appropriate adjustments to your printer so
  8182.          that it starts printing at the upper left corner of your labels.
  8183.  
  8184.          2.  Build a query.
  8185.          Move the cursor to the state field before displaying the Query
  8186.          window. Choose "Build Query..." from the Data menu or press (ALT+Q)
  8187.          to display the Query window. Set the condition to find all contacts
  8188.          sorted alphabetically by state and press (Esc) to close the window.
  8189.          Query window.
  8190.  
  8191.          3.  Start the Search & Print.
  8192.          Press (ALT+F) P to display the Print window. Choose SEARCH & PRINT.
  8193.  
  8194.          Each copy of the mailing label will be briefly displayed on your
  8195.          screen before it is printed.
  8196.  
  8197.  
  8198.  
  8199.  
  8200.  
  8201.                           Copyright (c) 1993 Piaf, Inc.
  8202.  
  8203.     Surefire S2.0 User's Guide                                       Page 140
  8204.  
  8205.     Envelopes
  8206.  
  8207.          Envelopes are very similar to mailing labels. You can project the
  8208.     fields in exactly the same manner. The only difference is that you
  8209.     format the document to have an envelope page. Do this with the Format
  8210.     window. If the size you are using is in the "Page Sizes" pop-list, just
  8211.     select it. If it isn't, you can specify the size explicitly by choosing
  8212.     "Specific Setting". This allows you to type in the width and length of
  8213.     your envelope. After setting the page size to match that of your
  8214.     envelope, paste the projected fields so that they are lined up on the
  8215.     page as you would like to see them on the envelope.
  8216.  
  8217.          If you already have a mailing label document, you may create an
  8218.     envelope document even more easily. Just  Get the label document and
  8219.     re-format the document with a page size of the proper envelope. Then,
  8220.     move the fields to their appropriate places and Save the document with
  8221.     a different name. The fields are automatically projected from the same
  8222.     database.
  8223.  
  8224.           If you wish, you may type in your return address in the upper left
  8225.     corner. The return address will then also be printed on each envelope.
  8226.     Now save your document. Use (F8) to get any record. Print just one
  8227.     envelope to see how things line up. Make adjustments if needed.
  8228.  
  8229.     Form Letters
  8230.  
  8231.          Form letters are similar to mailing labels and envelopes except
  8232.     that the address information is put on an 8 1/2 by 11 inch page with
  8233.     margins. There is also a lot more text. And, of course, letters can have
  8234.     more than one page in the document. Use the same procedures already
  8235.     described for mailing labels to project fields. You may first type the
  8236.     text of your letter and then bring in the fields or you can start by
  8237.     projecting your fields.
  8238.  
  8239.          Date fields are a very handy feature in form letters. You can
  8240.     create a date field to always hold today's date. To do this, create the
  8241.     date field, where you want it, using the Create Field window. Make sure
  8242.     the "Default to Today" attribute is set. Now, whenever you use the
  8243.     document, today's date will automatically be set in the field.
  8244.  
  8245.          Form letters may also have fields embedded directly within the text
  8246.     of your paragraphs. Suppose you are keeping the age of your clients in
  8247.     your contacts database. Suppose further that you sell insurance and you
  8248.     want to inform clients who are over the age of 65 that a special policy
  8249.     is available. You would like your letter to read something like:
  8250.  
  8251.          "Being ?? years old entitles you to a very special policy..."
  8252.  
  8253.          The "??" can be substituted with the correct age just as easily as
  8254.     the address information. Just project the age field, but first make sure
  8255.     you select it with "Line Select" from the Edit menu. Now you may insert
  8256.     it, just like a word into your letter. By the way, don't forget that
  8257.     this field will behave just like a word. It will wrap and move as you
  8258.     edit the document. You can access the database with the document.
  8259.  
  8260.                           Copyright (c) 1993 Piaf, Inc.
  8261.  
  8262.     Surefire S2.0 User's Guide                                       Page 141
  8263.  
  8264.          Now you can print your letters based on age and have the age appear
  8265.     where it should in the sentence. Just open the Query window when the
  8266.     cursor is on the age field. Make sure the condition is set to search for
  8267.     contacts over age 65. (i.e. age GT    65 ). Finally, choose Search &
  8268.     Print from the Print window.
  8269.  
  8270.     Pre-Printed Forms
  8271.  
  8272.          In Surefire, you can make your own forms. You can set up an invoice
  8273.     or sales quote form the way you want, for example. You type in the text,
  8274.     draw the desired boxes and lines and create or project needed fields.
  8275.  
  8276.          Sometimes, it is more desirable or convenient to use pre-printed
  8277.     forms. These forms already have all the "standard" text and lines
  8278.     printed on them. Your job is to fill it out. As you might expect, you
  8279.     can set up documents in Surefire to print on these forms too. There are
  8280.     two things to consider when setting up for pre-printed forms. One is
  8281.     that the fields need to be accurately positioned so they will line up
  8282.     properly when printed. The other is that the Smart document containing
  8283.     these fields should not have any other text in it.
  8284.  
  8285.          For pre-printed forms, it is best to use two Smart documents. One
  8286.     will have all the needed fields lined up conveniently to be used as an
  8287.     outline on the screen. Informative text will show what type of data is
  8288.     expected in each field. These fields will be stored in a database. The
  8289.     other form document will have a page size that is exactly that of the
  8290.     paper form. You would project the fields from your outline document and
  8291.     position them exactly where they need to be for printing. Use the form
  8292.     document to do the printing on the paper form and use the outline
  8293.     document for data entry.
  8294.  
  8295.          You can position the fields on the form by knowing your font size
  8296.     and making some simple measurements. Since there are always 6 lines per
  8297.     inch, you can measure the height of the form in inches and multiply by
  8298.     6. This will give you the number of lines on the form. By finding where
  8299.     the first blank area is, you will have the line on which to start your
  8300.     field.
  8301.  
  8302.          Now determine the pitch for your font. Look at the "Print Font"
  8303.     multiple choice button of the Format window to see how many characters
  8304.     per inch your font will print. Get the distance from the left edge of
  8305.     the form to where there is a blank space for typing. Multiply this
  8306.     distance by the characters per inch (pitch) of your font. This will give
  8307.     you the column at which to place a field. Do this for each space on the
  8308.     form and take note of the column numbers.  Now you have enough
  8309.     information to place your fields correctly.
  8310.  
  8311.          After the fields are lined up in your form document, fill them out
  8312.     completely. Fill text fields with x's, numeric fields with 1's, etc.
  8313.     Then do a trial printing on a real form. Adjust your fields as needed.
  8314.     If all the fields are off by the same distance, you may just need to
  8315.     move the whole group of fields over a bit on the page. If not, you may
  8316.     need to move some of the fields individually or you may need to adjust
  8317.     the form in the printer to start at a place where things are lined up.
  8318.  
  8319.                           Copyright (c) 1993 Piaf, Inc.
  8320.  
  8321.     Surefire S2.0 User's Guide                                       Page 142
  8322.  
  8323.     Chapter 21     -    Advanced Database Topics
  8324.  
  8325.          In this chapter you will learn about the more advanced features of
  8326.     Surefire databases. These features will allow you to be more efficient
  8327.     as your databases get larger.
  8328.  
  8329.     Changing the Database Structure
  8330.  
  8331.          In Surefire, you define and create a database by indicating that
  8332.     certain document fields are to be stored and by then adding your first
  8333.     record.  You may still add, remove and change the sizes of these fields
  8334.     in any way you wish. However, altering fields may require a new database
  8335.     structure.  Sometimes this new structure will affect the data already
  8336.     stored in your database. Creating this new structure is called
  8337.     restructuring.  Let's illustrate with an example.
  8338.  
  8339.          Suppose the name field for our "contacts" document can only hold 15
  8340.     characters. Up till now this has been sufficient, but you just met a
  8341.     woman named Sharon Swenson-Tannenbaum and you realize that the name
  8342.     field needs to be bigger.  Don't worry.  You can change the size of your
  8343.     field and let Surefire take care of the rest.  First, you need to edit
  8344.     your document to enlarge this field. (See Chapter 14: Working With
  8345.     Fields). You do this in the same way as if the field were not stored.
  8346.     But this time, when you try to use your document again, Surefire
  8347.     displays a message window saying that a database restructure operation
  8348.     is necessary.
  8349.  
  8350.          A database restructure is an automatic operation that changes the
  8351.     database definition and adjusts all existing records to account for the
  8352.     field changes.  Surefire will recommend a database restructure whenever
  8353.     you add, delete, resize or change the name of  one or more   stored
  8354.     fields.
  8355.  
  8356.          You may remember that the records that you delete are actually just
  8357.     marked as inactive. This gives you a chance to reconsider whether you
  8358.     actually want them permanently removed from the database. After a while,
  8359.     it may become inefficient to search a database with many extra records.
  8360.     You may remove these records from the database permanently through a
  8361.     restructure operation. Choosing "Restructure" when you have not changed
  8362.     any stored fields, will simply remove these unwanted records.
  8363.  
  8364.          A change in a Stored field's name requires a change to the database
  8365.     definition and thus a restructure. If you want to change the name of a
  8366.     Stored field, you must do so while editing the document. Just switch to
  8367.     Document edit mode and then open the Command Edit window to change the
  8368.     field names. You may change all field names as desired before choosing
  8369.     the restructure operation.
  8370.  
  8371.          You tell Surefire to begin restructuring the database by choosing
  8372.     "Restructure" from the Data menu while in Document edit mode.
  8373.  
  8374.  
  8375.  
  8376.  
  8377.  
  8378.                           Copyright (c) 1993 Piaf, Inc.
  8379.  
  8380.     Surefire S2.0 User's Guide                                       Page 143
  8381.  
  8382.          Surefire will preserve your existing data wherever possible.
  8383.     However, sometimes a restructure may cause data loss or affect other
  8384.     documents.  So, before beginning the restructure operation, Surefire
  8385.     will give you a chance to reconsider in any of the following cases:
  8386.  
  8387.          If you                             Continuing may
  8388.  
  8389.          Make a stored field smaller.       Cause truncation or loss of
  8390.                                             data.
  8391.  
  8392.          Delete a stored field              Cause data loss.
  8393.  
  8394.          Delete or shrink a stored field    Affect projected documents. In
  8395.          when other documents project data  addition to the above
  8396.          from this document.                consequences, you may have
  8397.                                             projected documents with fields
  8398.                                             projected from fields that no
  8399.                                             longer exist. You must remove
  8400.                                             these fields.
  8401.  
  8402.          Note:   When you change a stored field, Surefire does not perform
  8403.     a restructure automatically. This is because you may be modifying
  8404.     several fields during the same period, and it may take some time. The
  8405.     restructuring will take more or less time depending on the current size
  8406.     of the database.
  8407.  
  8408.          Note:   You will not be able to use the document again until you
  8409.     either restructure your database or exit from Surefire without saving
  8410.     your changes.
  8411.  
  8412.  
  8413.     Using Calculated Fields
  8414.  
  8415.          A calculated field is a field whose value depends on one or more
  8416.     other fields in the document. The value of this field is set when a
  8417.     field command is executed. Each time you display records from the
  8418.     database, all field commands are re-executed. This allows the fields
  8419.     whose values are based on stored fields to be calculated correctly for
  8420.     the current record. Usually, you would not store these fields in a
  8421.     database since Surefire can calculate their values as needed.
  8422.  
  8423.          In the "lease" document that we use in practices, there are some
  8424.     calculated fields whose values are based on stored fields. Two of these
  8425.     are the lease deposit and balance. They are both calculated to be half
  8426.     the lease amount. Only the lease amount is stored. Each time that you
  8427.     display a record of the lease, the deposit and balance change to show
  8428.     the correct amount for that particular lease.
  8429.  
  8430.          Sometimes you may have a document that does a lot of calculations
  8431.     and you notice that it takes a long time to display each record. Now,
  8432.     Surefire could display your data more quickly if you stored your
  8433.     calculated fields. This is because the commands used to generate the
  8434.     values would not be re-executed for each displayed record.
  8435.  
  8436.  
  8437.                           Copyright (c) 1993 Piaf, Inc.
  8438.  
  8439.     Surefire S2.0 User's Guide                                       Page 144
  8440.  
  8441.          There is another reason why you may want to store a calculated
  8442.     field;  you can search on the value of a calculated field only if it is
  8443.     stored. For example, if you wanted to look for all the tenants who paid
  8444.     a deposit of more than 400 dollars you would need to store the deposit
  8445.     field in the database.
  8446.  
  8447.          If you find yourself wanting to query the database about a
  8448.     calculated field, you can change the field's data attribute to Stored,
  8449.     restructure the document and you have it.
  8450.  
  8451.     Using Hidden Fields
  8452.  
  8453.          You can use a hidden field  to store temporary results from
  8454.     calculations or to support a look-up table. A hidden field can also be
  8455.     used when you want to calculate and display a value based on a database
  8456.     field, yet you don't want to see the database field itself. Hidden
  8457.     fields are not really hidden at all. They just reside at a place in your
  8458.     document that is not normally displayed or printed.
  8459.  
  8460.          Suppose your database has a field containing a "method of payment"
  8461.     code. These are two letter codes corresponding to how an order will be
  8462.     paid:
  8463.               Code Meaning
  8464.  
  8465.               CK   Check
  8466.               MC   Master Card
  8467.               VS   VISA
  8468.               AM   American Express
  8469.               CS   Cash
  8470.  
  8471.          Now, you would like the full text description to be displayed.
  8472.     Here's how. For each possible code, you put the appropriate text
  8473.     string in a hidden field on another page of your document. When a data
  8474.     record is displayed, a field command is executed that tests the
  8475.     particular database field containing the code and finds the appropriate
  8476.     text in the look-up table.
  8477.  
  8478.          Here's another example of using hidden fields.  Suppose you have a
  8479.     projected document where you want to display data calculated from
  8480.     certain database fields but you do not want the original fields to
  8481.     appear. Since all field references in the calculated field must be known
  8482.     (i.e. exist somewhere in the document), you will need to use hidden
  8483.     fields.
  8484.  
  8485.          It is generally convenient to put hidden fields on the last page of
  8486.     the document, separate from everything else. You can label them and make
  8487.     notes next to them as you wish. And, when you print, if you do not want
  8488.     this page printed, it is easy to say so in the Print window.
  8489.  
  8490.  
  8491.  
  8492.  
  8493.  
  8494.  
  8495.  
  8496.                           Copyright (c) 1993 Piaf, Inc.
  8497.  
  8498.     Surefire S2.0 User's Guide                                       Page 145
  8499.  
  8500.     Using Database Searching Functions
  8501.  
  8502.          There are a number of functions in Surefire that specifically
  8503.     relate to database operations. Some functions allow statistical
  8504.     calculations on field values that span more than one database record.
  8505.     These include finding the sum, average, maximum and minimum values for
  8506.     a set of records. These functions are only meaningful when you display
  8507.     a list of records as a report. They are therefore discussed in "Chapter
  8508.     22: Generating Reports".
  8509.  
  8510.          Other functions used with data records control searching a
  8511.     database. These are typically used in field commands for button fields.
  8512.     These functions are used extensively for building applications with
  8513.     Surefire's Smart documents. The table below summarizes these functions.
  8514.  
  8515.          Use Function   To
  8516.  
  8517.          @QUERY    Run a named query.
  8518.          @JOIN     Run a named query in another document.
  8519.          @CNDX     Define conditions to be used in @QUERY or @JOIN.
  8520.          @UPDATE   Update the currently displayed record with all field
  8521.                    values.
  8522.          @SEARCH   Search the database based on the value in the current
  8523.                    field.
  8524.  
  8525.          On the following pages we show how to use the @JOIN and @CNDX
  8526.     functions to join a base document with a document projected from the
  8527.     same database. At the end of this chapter, you will learn how these
  8528.     functions may be used to join two databases together. These functions
  8529.     are fully described in the section "Database Searching Functions" of
  8530.     "Appendix A: Surefire Function Reference".
  8531.  
  8532.          The use of @CNDX and @JOIN together is especially powerful. Because
  8533.     of this we will explain through an illustration and a step by step how
  8534.     they work. The documents "contacts" and "letters" are linked together
  8535.     through the use of these commands. This command is in the Letter button
  8536.     of "contacts":
  8537.                         @CNDX("letter", "curname", A, ,"name");
  8538.                         @JOIN("letter", "curname")
  8539.  
  8540.     In the "letter" document is the query "curname" with a query line
  8541.     looking for "the Text field 'name' Is Exactly blank". The blank data
  8542.     entry field for the condition will eventually be filled in by the result
  8543.     of the @CNDX function or what is in field A, the contact's actual name.
  8544.  
  8545.          Let's discuss how everything works together. When you press the
  8546.     button Letter, you will see a letter with address information for the
  8547.     current contact. To do this, the button has a command with both an @CNDX
  8548.     function and an @JOIN function. The @CNDX function sets a value for a
  8549.     specific condition of a named query. (You can use one @CNDX function for
  8550.     each condition or query line of a query). The @JOIN function tells
  8551.     Surefire to display the specified document and search the database using
  8552.     a named query.
  8553.  
  8554.  
  8555.                           Copyright (c) 1993 Piaf, Inc.
  8556.  
  8557.     Surefire S2.0 User's Guide                                       Page 146
  8558.  
  8559.          It's not always necessary to set values for conditions of a query,
  8560.     but we want to in this case. That's because we want to display the
  8561.     letter showing only the address information for the currently displayed
  8562.     contact. The @CNDX here has these arguments: ("letter", "curname", A, ,
  8563.     "name").  The first two arguments tell Surefire to set a value for a
  8564.     condition in the named query curname in the document letter.  Notice the
  8565.     quote marks ("); they are required.
  8566.  
  8567.          The third argument, A, represents field A in the "contacts"
  8568.     document. This field holds the  contact's name. Because this field was
  8569.     given the name "name", we could have used name instead of A in the
  8570.     function.  When the command is executed, Surefire will remember the
  8571.     value of the contact name field. It will then use this value for one of
  8572.     the conditions of the named query 'curname'.
  8573.  
  8574.          The fourth argument is missing from this function as shown by the
  8575.     two commas. This argument would be used if we were setting the values of
  8576.     a range condition. It can have the value for the upper end of the range.
  8577.     In our example we have the single condition Is Exactly, so this argument
  8578.     is not needed.
  8579.  
  8580.          The fifth argument tells Surefire the specific line of the query
  8581.     whose condition you want to set. In this case, "name" relates to name
  8582.     which is displayed at the left of the query line in curname. The quotes
  8583.     (") here are also required.  Notice in the query that we left the data
  8584.     entry field to the right of the condition button blank. This is because
  8585.     we want Surefire to substitute a value from the @CNDX function before
  8586.     the query is actually used. If the query curname were executed without
  8587.     setting a condition value, the search would look for contact names that
  8588.     are exactly all blank and would probably find no matching records.
  8589.  
  8590.          Finally, the @JOIN command says simply to display the document
  8591.     letter and run the query curname. So now Surefire knows that you really
  8592.     want to display the letter for the contact whose name is in the name
  8593.     field. The practice on the next page gives you the steps to display the
  8594.     letter for the currently displayed contact at the press of a button.
  8595.  
  8596.  
  8597.     Recalling a Deleted Record
  8598.  
  8599.          The data records that you delete when you choose "Delete Record(s)"
  8600.     from the Data menu are actually not removed from the database but are
  8601.     made inactive.  You may recall a previously deleted record, that is,
  8602.     restore it to an active status, if it is the currently displayed record.
  8603.     But, since deleted records are not usually displayed, you must first
  8604.     indicate that you wish to view these deleted records.
  8605.  
  8606.          You do this by changing the setting of the "Record Type for Search"
  8607.     button in the Search Options window to All or Deleted. This window is
  8608.     accessed from the Data menu and is described in the chapter "Searching
  8609.     a Database". Then, you can define a query and start your search. The
  8610.     records that interest you will be displayed.
  8611.  
  8612.  
  8613.  
  8614.                           Copyright (c) 1993 Piaf, Inc.
  8615.  
  8616.     Surefire S2.0 User's Guide                                       Page 147
  8617.  
  8618.          When the record you want to recall is visible, choose "Recall
  8619.     Record(s) " from the Data menu or press (F5). The status indicator
  8620.     "RECORD RECALLED" will be briefly displayed at the right side of the
  8621.     status line.
  8622.  
  8623.          Note: All inactive records are finally removed from the database
  8624.     when the database is restructured. Until then, you may recall them
  8625.     whenever you wish.
  8626.  
  8627.     Manipulating Record Sets
  8628.  
  8629.          Up until now we have been talking about how to work on one data
  8630.     record at a time. Suppose you had a number of salespersons who were
  8631.     responsible for different territories. The salesperson and territory
  8632.     might be fields of your contacts database. If you want to reassign all
  8633.     of the clients in one specific territory to another salesperson, you
  8634.     certainly wouldn't want to change and update each individual record in
  8635.     that territory. Surefire provides a way to update, delete and recall all
  8636.     records in a record set. That means you can update, delete and recall
  8637.     all the records that satisfy specific conditions at one time.
  8638.  
  8639.        Updating A Record Set
  8640.  
  8641.          Sometimes you may want to have the value of a single field updated
  8642.     to reflect some new information for all records that satisfy certain
  8643.     conditions. This is often called group update or mass update. For
  8644.     example, you might have just sent a letter to all of your contacts in a
  8645.     certain zip code. You will want to change the date of the last letter
  8646.     sent, in all of these records, to today.
  8647.  
  8648.          To do this, you must first build your query or Get a named query.
  8649.     Then, instead of performing a search, you move to the document field
  8650.     that you want changed and enter the new value that you want all the
  8651.     qualifying records to have. Choose "Update Record(s)" on the Data menu.
  8652.          Before the update takes place, the message "All qualifying records
  8653.     will be updated" is displayed. Choose YES if you want the update to
  8654.     occur or NO otherwise. After all records have been updated, the status
  8655.     indicator "RECORD(S) UPDATED" will be displayed briefly at the right of
  8656.     the status line.
  8657.  
  8658.          When the update is finished, all records will have the new value.
  8659.     You can repeatedly use the same procedure to update other fields of the
  8660.     same qualifying records.
  8661.  
  8662.        Deleting A Record Set
  8663.  
  8664.          When you delete a record, you display it first to make sure that it
  8665.     is the correct one. At times, you may want to delete a group of records
  8666.     that satisfy some specific condition at one time without reviewing each
  8667.     one. This is sometimes called group delete or mass delete.  For example,
  8668.     you may want to remove all contacts where the last correspondence was
  8669.     sent more than two years ago. Or if you've just stopped eating red meat,
  8670.     you may want to remove your recipes that include beef.
  8671.  
  8672.  
  8673.                           Copyright (c) 1993 Piaf, Inc.
  8674.  
  8675.     Surefire S2.0 User's Guide                                       Page 148
  8676.  
  8677.          To delete these records, you can follow a procedure similar to that
  8678.     used for a group update. In this case, you build or Get a query but you
  8679.     do not specify a new field value. Then you choose "Delete Record(s)"
  8680.     from the Data menu or press (ALT+F5).
  8681.  
  8682.          Before the deletions are done, the message, "All qualifying records
  8683.     will be deleted", is displayed. Choose YES if you want the deletes to
  8684.     occur or NO otherwise. After all records have been deleted, the status
  8685.     indicator "RECORD(S) DELETED" will be displayed briefly at the right of
  8686.     the status line.
  8687.  
  8688.          If you continue after the warning message, all qualifying records
  8689.     will be deleted or made inactive.  You may, of course, recover them by
  8690.     restoring them to active status through a recall operation. You may
  8691.     practice this using a query of your choice and then recall the deleted
  8692.     records by following the procedure in the next section.
  8693.  
  8694.          Note:   You must change the "Record Type for Search" option in the
  8695.     Search Options window to All or Active before deleting a record set.
  8696.  
  8697.        Recalling A Record Set
  8698.  
  8699.          Especially if you have second thoughts about records that you
  8700.     deleted as a group, you may sometimes want to recall a group of records
  8701.     at one time without reviewing each one. To do so, you follow a procedure
  8702.     which is similar to deleting a record set. The only difference is that
  8703.     you choose "Recall Records" from the Data menu or press (F5), instead.
  8704.     All qualifying records will be recalled.
  8705.          Before the recall takes place, a warning message is displayed.
  8706.     Choose YES if you want the recall to occur or NO otherwise. After all
  8707.     the records have been recalled, the status indicator "RECORD(S)
  8708.     RECALLED" will be displayed briefly at the right of the status line.
  8709.  
  8710.          Note:   You must change the "Record Type for Search" option in the
  8711.     Search Options window to All or Deleted before recalling a record set.
  8712.  
  8713.  
  8714.     Importing and Exporting Data
  8715.  
  8716.          You have seen how to use the database features of Surefire's Smart
  8717.     Documents to keep your information in one handy place. Sometimes,
  8718.     however, you may need to use data from other database systems. Or, you
  8719.     may purchase data such as mailing lists in a format that you would like
  8720.     Surefire to read.
  8721.  
  8722.          In the following sections you will learn how to use the import and
  8723.     export facilities of Surefire to bring in data from other programs and
  8724.     output data from Surefire to other programs. You will see that by
  8725.     exporting and importing data, you can easily create new Surefire
  8726.     databases and even merge many databases into one larger database.
  8727.  
  8728.  
  8729.  
  8730.  
  8731.  
  8732.                           Copyright (c) 1993 Piaf, Inc.
  8733.  
  8734.     Surefire S2.0 User's Guide                                       Page 149
  8735.  
  8736.        Importing Data
  8737.  
  8738.          If you have data from another program that you wish to incorporate
  8739.     into a Surefire database, it must be in the form of an ASCII data file.
  8740.     You need to follow the procedures for the application from which you are
  8741.     getting the data. Most popular applications will be able to output data
  8742.     to a file in this ASCII (text) data format. Once you have the data from
  8743.     the other program in the correct format, you can import  that data into
  8744.     Surefire through a document. If there is already a database associated
  8745.     with the document, the imported records will be appended to the
  8746.     database. If there is no associated database, one will be created. To
  8747.     import the data you use the Get File window by setting the file type
  8748.     button to "Data File".
  8749.  
  8750.           There are some simple formatting rules that must be followed to be
  8751.     sure that both the ASCII data file and your document conform correctly.
  8752.     These rules are described below:
  8753.  
  8754.          Format for the ASCII Data File
  8755.  
  8756.          1)   Each text value in the ASCII file must be surrounded by quotes
  8757.               (").  Number values may or may not have quotes.
  8758.          2)   All values must be delimited by a comma (,).
  8759.  
  8760.          3)   Each record or set of data values must be terminated by a
  8761.               (CR-LF) character.
  8762.  
  8763.          4)   If no filename extension is given to the ASCII file, the
  8764.               default extension, .DTA, will be assumed.
  8765.  
  8766.          Rules for Setting Up Surefire Documents for Import
  8767.  
  8768.          1)   If there are n fields to be imported into the database, the
  8769.               first n Stored or Projected fields of the document must
  8770.               correspond in order and type to the fields in the ASCII import
  8771.               file.
  8772.  
  8773.               The ordering of the fields in the document is the same as the
  8774.               way you move from field to field using the (End) key. That is,
  8775.               from left to right and then down through the document.
  8776.               Corresponding in type means that number values in the ASCII
  8777.               file go with numeric fields in the document, text values go
  8778.               with text fields, etc.
  8779.  
  8780.          2)   Any additional Stored/Projected fields in the document will
  8781.               set their associated database fields, in all records, to their
  8782.               currently displayed values in the document.  If there are
  8783.               calculated fields which are Stored, the calculated values for
  8784.               these fields will be stored in the data records.  That is, the
  8785.               calculations will be performed just before the imported data
  8786.               is added as a record.  Database fields without corresponding
  8787.               document fields will have their values cleared in all imported
  8788.               records.
  8789.  
  8790.  
  8791.                           Copyright (c) 1993 Piaf, Inc.
  8792.  
  8793.     Surefire S2.0 User's Guide                                       Page 150
  8794.  
  8795.          3)   There must be at least as many Stored or Projected fields in
  8796.               the destination Surefire document as the number of values you
  8797.               want imported from each record in the ASCII data file.
  8798.  
  8799.          4)   The ASCII data file may have field values that you do not want
  8800.               to import.  If this is the case, you must create a Non-Stored
  8801.               field of the appropriate type in the proper place in your
  8802.               document. This dummy field will act as a placeholder to accept
  8803.               the value. Use a dummy field also if there are empty values at
  8804.               the same place in all records of the ASCII file. Empty values
  8805.               are indicated by two adjacent commas (,,).
  8806.  
  8807.          5)   If a Surefire document field is smaller than the value for
  8808.               that field from any imported record, that value will be
  8809.               truncated.
  8810.  
  8811.          Say you want to import data from a file that we have set up as an
  8812.     ASCII data file from another database. This database has the following
  8813.     fields defined; person's name, age, phone number and marital status. The
  8814.     first field is a text string, the second is a number and the third and
  8815.     fourth are also text strings. To import the data from this database into
  8816.     a Surefire document, you need to get the data written like this:
  8817.  
  8818.          "name",age,"phone number", "marital status" (CR-LF)
  8819.               or
  8820.          "name","age","phone number","marital status" (CR-LF)
  8821.  
  8822.          Notice that the age field may or may not have double quotes (").
  8823.     This is because it is a simple integer number. Notice also that each
  8824.     line in the example text file is terminated by a carriage return and
  8825.     linefeed character shown here as (CR-LF).
  8826.  
  8827.          Now let's say that you want to import this data (which is in a file
  8828.     called IMPORT.DTA) into the "contacts" document. This document contains
  8829.     fields for name, address, phone, age, notes, etc. You may notice that
  8830.     the order of the fields in this document doesn't match the order of
  8831.     values in the data file. Also, there is no field in "contacts"
  8832.     corresponding to marital status.  What you need to do is create a
  8833.     projected document with projected fields for name, age and phone number
  8834.     in this order. This document will have a dummy field for marital status.
  8835.  
  8836.          Note:   You could add a marital status field to your "contacts"
  8837.     document and restructure your database.  Then you could also project the
  8838.     marital status field and also import the marital status data.
  8839.  
  8840.          As you import data, each successive record read from the ASCII file
  8841.     will be added to the Surefire database that corresponds to the document.
  8842.     Any fields in the document that follow these four fields will be
  8843.     unchanged by the import. If there are any Stored or Projected fields in
  8844.     the document that do not correspond to values in the ASCII file, their
  8845.     values that are displayed in the document at the time of the import will
  8846.     be used to set default values for those fields of the new data records.
  8847.     If there are no such fields, the values of these parts of the data
  8848.     records will remain clear and can be filled in later.
  8849.  
  8850.                           Copyright (c) 1993 Piaf, Inc.
  8851.  
  8852.     Surefire S2.0 User's Guide                                       Page 151
  8853.  
  8854.        Exporting Data
  8855.  
  8856.          If you have data in a Surefire database that you wish to
  8857.     incorporate into another program, you may do so by writing the data out
  8858.     into an ASCII data file. This is known as exporting the data. In
  8859.     Surefire you can export data using the same format already described for
  8860.     importing data. This format is understood by most popular programs. You
  8861.     may use any query to limit which data records are exported from a
  8862.     database. You may use projected documents to limit which fields of data
  8863.     records are exported, and to rearrange the order in which their values
  8864.     will be written to the ASCII data file.
  8865.  
  8866.          To export the data, use the Save File window, setting the file type
  8867.     button to "Data File". Then follow the rules described below.
  8868.  
  8869.          Rules for Exporting Surefire Data
  8870.  
  8871.          1)   No export will occur unless the associated Surefire database
  8872.               exists and there is at least one record that satisfies the
  8873.               search conditions.  An appropriate query must be specified
  8874.               before the data export is initiated.
  8875.  
  8876.          2)   The values of all fields of the current document, excluding
  8877.               buttons, will be exported.
  8878.  
  8879.          3)   The order of the fields put into the ASCII data file will be
  8880.               the order in which they appear in the Surefire document.
  8881.  
  8882.          4)   The output of the export operation will be in the ASCII data
  8883.               file format described on page 21-17.
  8884.  
  8885.  
  8886.          To export data from a Surefire database, follow these simple steps:
  8887.  
  8888.          1)  Get the document from which you want to export data.
  8889.          2)  Build a query to limit the records to be exported.
  8890.          3)  Open the Save File window and set the File Type multiple choice
  8891.          button to "Data File". Type in the name of the file you want to
  8892.          contain the exported data. Surefire will give this file the
  8893.          extension .DTA. Press OK to start the database search and export
  8894.          operation. You will hear a beep when the export has finished.
  8895.  
  8896.  
  8897.        Merging and Extracting Surefire Databases
  8898.  
  8899.          There are times when you may want to create a new database from one
  8900.     that already exists. This new database may have fewer records or fewer
  8901.     fields. With a smaller portion of the data, all your database operations
  8902.     will perform more efficiently. Also, you can analyze this data while
  8903.     someone else is using the original database. You would use this smaller
  8904.     database periodically, perhaps, to do your monthly reports. Each month,
  8905.     you would extract the most recent data from the "master" customer
  8906.     database.
  8907.  
  8908.  
  8909.                           Copyright (c) 1993 Piaf, Inc.
  8910.  
  8911.     Surefire S2.0 User's Guide                                       Page 152
  8912.  
  8913.          At other times you may want to have a database that is a
  8914.     conglomerate of many other databases with the same format. For example,
  8915.     say each salesperson has a database of sales activities that are in his
  8916.     territory. You may want to "merge" these independent databases into a
  8917.     single one for analysis. You can analyze the effectiveness of all your
  8918.     sales activities to help produce your sales forecasts.
  8919.  
  8920.          Since the file format required for importing data and the one
  8921.     needed for exporting data are the same, you may use consecutive export
  8922.     and import operations to extract and merge data from Surefire databases.
  8923.     The databases may be merged together simply by importing one or more
  8924.     extracted ASCII data files into the same document.
  8925.  
  8926.  
  8927.     Joining Two Databases
  8928.  
  8929.          Earlier in this chapter you were introduced to the database
  8930.     searching functions. You saw how to use @JOIN and @CNDX to join two
  8931.     documents together that share the same database. With Surefire it is not
  8932.     necessary that a database be shared for one document to link with
  8933.     another.  The only thing that is required is that the two databases
  8934.     share at least one piece of data. As long as the fields with this data
  8935.     are the same type and size, a join is possible.
  8936.  
  8937.          For example, if your "contacts" database has a field for company
  8938.     name. you might have an "account history" database that also has a field
  8939.     for company name.  Let's call the account history document, "accthist".
  8940.     If records are entered in both databases for the same company, a button
  8941.     in the "contacts" document can be used to bring up the account history
  8942.     information about the current company. You would use the @CNDX function
  8943.     to set the query condition based on the company name in the "contacts"
  8944.     document. You then use @JOIN to go to and execute a named query in the
  8945.     "accthist" document based on this same company name.
  8946.  
  8947.          Voila, you are well on your way to creating Smart Document
  8948.     applications!
  8949.  
  8950.  
  8951.     Duplicate Records
  8952.  
  8953.          Using the Create Field and Modify Field windows, you can mark one
  8954.     or more stored fields of your document as having a duplicate check
  8955.     attribute. These fields will be used to check for duplicate records in
  8956.     the database associated with that document. Before a record is added or
  8957.     imported to the database, Surefire will search the database to see if
  8958.     there are any records that have the same values as the fields you have
  8959.     marked. If such a record is found, the following message window is
  8960.     displayed.
  8961.  
  8962.          For each duplicate record that Surefire finds, you have the choice
  8963.     of adding the new record, updating the old record with the new information
  8964.     or skipping any action entirely. Choose ADD if  you want to add the new
  8965.     record to your database. This will leave possibly two records for the
  8966.     same item being maintained in your database. Choose UPDATE if you want to
  8967.  
  8968.                           Copyright (c) 1993 Piaf, Inc.
  8969.  
  8970.     Surefire S2.0 User's Guide                                       Page 153
  8971.  
  8972.     replace the existing record entirely with the new record. This will leave
  8973.     one record, the new record, for the item in conflict. Surefire will not,
  8974.     however, merge different data from the two records into one. Lastly, you
  8975.     may choose SKIP if you want to leave the database as it is.
  8976.  
  8977.          If you skip or add the new record you can visually inspect the
  8978.     existing record at a later time and then decide how to resolve the
  8979.     conflict. If there are 2 records, you may want to delete one.
  8980.     Alternatively, you may want to compare the existing data with the new
  8981.     data, enter new information in some fields of the original record, and
  8982.     then update it. You can search on key information about the record such
  8983.     as a person's name to find the records in the database. If you chose to
  8984.     update the record when the Duplicate Record message appeared, the
  8985.     original record is marked deleted by Surefire or inactive. You can still
  8986.     view this record by setting an option in the Database Options window and
  8987.     searching the database.
  8988.  
  8989.          Here is an example. Say you select duplicate checking for the stored
  8990.     fields "name" and "city" in your contacts document. If you now add a
  8991.     record for Joe Smith in Boston, Surefire will search for any records of
  8992.     Joe Smith in Boston (but not Joe Smith in London or Calgary).
  8993.  
  8994.     Note: Since this could be a performance issue, you can toggle whether
  8995.     duplicate checking occurs via the Database Options window (choose Database
  8996.     Options on the Data menu).
  8997.  
  8998.     Note:  If you save a document that has any field with this attribute, the
  8999.     document will not be readable by versions of Surefire before Version 2.0.
  9000.  
  9001.     Duplicate Record Checking During Import
  9002.  
  9003.          When importing records into a database when duplicate record checking
  9004.     is active, you will see this message first.
  9005.  
  9006.          You may respond to the question with Yes, No or Cancel.  If you're
  9007.     not sure what to do at this point you may Cancel the import operation by
  9008.     choosing CANCEL. If you choose YES, all records found during the import
  9009.     operation that have duplicates in the database will be updated,
  9010.     overwriting the original records. This is handy when you know that the
  9011.     data you are adding are more recent than your original data. But be sure
  9012.     that you haven't made changes to the original data yourself, since these
  9013.     changes may be lost. If you choose NO, Surefire will display the
  9014.     Duplicate Record message window each time a duplicate is found. You then
  9015.     have the option to Add, Update or Skip on each occurrence.
  9016.  
  9017.  
  9018.  
  9019.  
  9020.  
  9021.  
  9022.  
  9023.  
  9024.  
  9025.  
  9026.  
  9027.                           Copyright (c) 1993 Piaf, Inc.
  9028.  
  9029.     Surefire S2.0 User's Guide                                       Page 154
  9030.  
  9031.     The Persistent Counter
  9032.  
  9033.          The persistent counter is a value associated with a database that gets
  9034.     incremented whenever a record is added to a database. Since this number is
  9035.     kept current across Surefire sessions, it is handy for invoice numbers,
  9036.     check numbers, etc. The next number is always available. The default initial
  9037.     value of a persistent counter before any records are added to a database is
  9038.     1. You may change this value in the Database Options window.
  9039.          In the Create Field or Modify Field windows, you can mark a stored
  9040.     numeric field with a counter attribute. This field can then hold the
  9041.     sequential persistent counter value that "remembered" for each document
  9042.     across Surefire sessions.
  9043.  
  9044.          When you use the document, if the current field (the field that is
  9045.     highlighted) has this attribute, an asterisk '*' will appear at the far
  9046.     right of the status line. If you "clear" a field or cell with this
  9047.     attribute via (ALT+Y), (Ctrl+K) or (Enter) at the leftmost character,
  9048.     Surefire will set the field to the current value of the counter. This
  9049.     field will also display the current counter value when you Get the
  9050.     document in preparation for you to add a new record to the database.
  9051.  
  9052.          Say you have an invoice document with a stored field for the invoice
  9053.     number. You want to have the same invoice number in your database as
  9054.     appears on your pre-printed paper invoices. Let's say also that these
  9055.     paper invoices are numbered starting at 1001.
  9056.  
  9057.          First, set the counter attribute for the invoice number field. To
  9058.     do this, edit the document and choose "Modify..." on the Field menu to
  9059.     open the Field Modify window for that field. Answer 'Y' to the question
  9060.     "Use Counter?" by toggling the logical field. Now, return to using the
  9061.     document. You also want to set the Persistent Counter to start at 1001
  9062.     before adding any records. For this, open the Database Options window by
  9063.     choosing "Database Options..." from the Data menu. Enter the value 1001
  9064.     in the field next to "Persistent counter:" and choose OK.
  9065.  
  9066.          Let's see how it works when using the invoice document. Before you
  9067.     add each record to the database, move to the invoice number field and
  9068.     press (Enter). The next value will appear. In this example, 1002, 1003,
  9069.     1004, etc.
  9070.  
  9071.          When you view the records that are already in the database via
  9072.     (F8) or (F7), the invoice numbers displayed will be those for the saved
  9073.     records. You can always set the field to the next available value if you
  9074.     want to add a new record.
  9075.  
  9076.     Note:  If you save a document that has any field with this attribute,
  9077.     that document will not be readable by versions of Surefire before Version
  9078.     2.0.
  9079.  
  9080.  
  9081.  
  9082.  
  9083.  
  9084.  
  9085.  
  9086.                           Copyright (c) 1993 Piaf, Inc.
  9087.  
  9088.     Surefire S2.0 User's Guide                                       Page 155
  9089.  
  9090.     Chapter 22     -    Generating Reports
  9091.  
  9092.          Up until now you have seen how to get one record of data into your
  9093.     document at a time. Often, you want to see many records or data fields
  9094.     in relation to one another at the same time. You may want to see just
  9095.     the names and phone numbers of all your contacts. Or, you may be
  9096.     interested in seeing statistical data based on your records. This can be
  9097.     something like the average salaries of personnel in each department of
  9098.     your company, or the number of clients in each city of a region, etc.
  9099.  
  9100.          A report is the result of using a document to retrieve more than
  9101.     one data record at a time. You can use a report to see many records in
  9102.     relation to one another or to produce a summary of database information
  9103.     ready for printing. You might want to list all of your contacts and
  9104.     their phone numbers or your company personnel and their departments.
  9105.  
  9106.          Suppose you use a document to enter information about the personnel
  9107.     in your company. This document might have fields for name, title, phone,
  9108.     mail stop and department laid out one above.
  9109.  
  9110.          Because of the difference in layout and amount of information, the
  9111.     document you use for a report generally has projected fields. You create
  9112.     this document by projecting fields the way you would for forms and form
  9113.     letters except you place the fields and text differently, generally left
  9114.     to right across the page. You then give the fields report attributes.
  9115.     Instead of having each data field on a separate line or imbedded in
  9116.     paragraphs, you generally will have the fields across the page with
  9117.     column names across the top of each page. Surefire's general page layout
  9118.     capabilities allow a report to be printed on an 8-1/2 by 11 page with
  9119.     standard margins and a header on each page.
  9120.  
  9121.          There is no reason why you could not use a document laid out in
  9122.     report format to add and review records one-at-a-time as we discussed in
  9123.     the previous chapters. However, you can see that the first document is
  9124.     more convenient for data entry. Now you will learn how to set up the
  9125.     second type of document layout for data reporting.
  9126.  
  9127.  
  9128.     Formatting a Report
  9129.  
  9130.          A field's format attributes determine the way data in the field
  9131.     looks. Its data attribute determines whether or not a field is stored in
  9132.     a database. A field may have one other type of attribute. The report
  9133.     attributes of a field determine how the values of many database records
  9134.     are to appear in your document. You assign report attributes to fields
  9135.     in order to tell Surefire that a document will be used to retrieve more
  9136.     than one data record at a time. You specify these additional attributes
  9137.     in the Format Report window. You may display this window by choosing
  9138.     "Format Report..." from the Data menu while you are in Document edit
  9139.     mode.  This window contains various options that determine how multiple
  9140.     data records will expand into your document to produce a report.
  9141.  
  9142.  
  9143.  
  9144.  
  9145.                           Copyright (c) 1993 Piaf, Inc.
  9146.  
  9147.     Surefire S2.0 User's Guide                                       Page 156
  9148.  
  9149.          An entire document can be a report or you can imbed your report
  9150.     directly within the body of another document. Suppose you want the
  9151.     milestones that represent the progress on a specific task to be
  9152.     generated right into the middle of a progress report. Or suppose you
  9153.     have supporting statistics that you want to appear as an addendum to a
  9154.     summary letter.  By placing the fields with report attributes at the
  9155.     proper places in your document, you can  accomplish this.
  9156.  
  9157.          You don't even need to worry about having lots of empty pages in
  9158.     your document since Surefire will add pages as needed to accommodate all
  9159.     the records. This gives you a lot of flexibility. The following sections
  9160.     describe each of the formatting options available in the Format Report
  9161.     window.
  9162.  
  9163.        Specifying Repeated Fields
  9164.  
  9165.          You indicate how the data of each retrieved data record will be
  9166.     displayed one after another by giving these fields a repeat setting.
  9167.     Surefire still uses fields to display the values of stored data records,
  9168.     but just before each successive qualifying record is displayed, the
  9169.     repeated fields "move" to a new location. With a repeat setting, you
  9170.     specify where this new location is. Now Surefire can display the next
  9171.     set of data. To generate a report, you must have at least one field that
  9172.     has a repeat setting. Generally, you would set your repeated fields
  9173.     before using any of the other report attributes.
  9174.  
  9175.           You can repeat both stored and non-stored fields. The non-stored
  9176.     fields are usually fields with values calculated from database fields
  9177.     but they may actually have constant values or trim.  Once you know the
  9178.     fields that you want to repeat, you switch to Document edit  mode so
  9179.     that you can set the report attributes for them. You select the fields
  9180.     by using Field selection before you open the Format Report window.
  9181.  
  9182.          If there are no report attributes for the first selected field, you
  9183.     will see a response window that looks like this:
  9184.  
  9185.           You may respond by choosing YES or NO. If you choose NO, you
  9186.     return directly to the document without setting any report attributes.
  9187.     If you choose YES, the Format Report window will be displayed.
  9188.  
  9189.          The second action button at the top of the Format Report window is
  9190.     SET OFFSET. Choosing this button will temporarily close the window and
  9191.     allow you to position the cursor in the document. The cursor will
  9192.     initially be at the left character of the left most field that you had
  9193.     selected.  You  move the cursor downwards to define the vertical report
  9194.     spacing by pressing (down arrow). Each screen position that you move
  9195.     tells Surefire how much space to leave between successive records. Once
  9196.     the cursor is where you want it, press (Enter). If you would rather not
  9197.     finish the layout at this time, press (Esc) to cancel. In either case,
  9198.     the Format Report window will reappear.
  9199.  
  9200.  
  9201.  
  9202.  
  9203.  
  9204.                           Copyright (c) 1993 Piaf, Inc.
  9205.  
  9206.     Surefire S2.0 User's Guide                                       Page 157
  9207.  
  9208.          When the Format Report window is redisplayed, a new multiple choice
  9209.     button will appear saying Fill Down. In addition, the number of blank
  9210.     lines to leave between the data from each record is indicated by the
  9211.     text "Skipping 1 Lines". Choosing OK at this point sets the report
  9212.     attributes.  All fields that are repeated will have the same repeat
  9213.     setting and thus will have the same spacing between data records. Each
  9214.     data record may take up more than one line of the report.
  9215.  
  9216.          The next search in this document would bring back all qualifying
  9217.     records, display each one on a line, filling records to the bottom of
  9218.     every page, and create pages as needed until all records were retrieved.
  9219.  
  9220.          The "Fill Down" button has another possible value of "Repeat field
  9221.     n times". If you wanted only a limited number of records to be displayed
  9222.     per page, press (Spacebar) to change Fill Down to Repeat field.  Then
  9223.     enter the number of times in the data entry field.
  9224.  
  9225.        Using Trim
  9226.  
  9227.          Trim is constant text and graphics that adds emphasis to your
  9228.     report. You can have trim fields that have a repeat attribute to appear
  9229.     near each data record. Or, you can use trim to label report columns or
  9230.     to appear at the top or bottom of every report page. Trim might consist
  9231.     of lines, tic marks, text, etc. And, you can always use the Header and
  9232.     Footer regions of the document for report titles, etc.
  9233.  
  9234.           To use trim, you must first create text fields in your report
  9235.     document to hold the trim. Then, using the document, you put the desired
  9236.     text or graphics into the fields. Once this is done, you can specify the
  9237.     trim fields to be repeated along with the other data fields. Use the
  9238.     same method described above for data fields to show Surefire how these
  9239.     trim fields are laid out.
  9240.  
  9241.          For example, if you want to have lines or tic marks drawn after
  9242.     every record, simply create a text field below the repeated fields, use
  9243.     line drawing to draw a line in the text field, and set the repeat for
  9244.     this field along with the stored fields.
  9245.  
  9246.        Clearing the Repeat Specification
  9247.  
  9248.          Once you have associated a repeat attribute with your fields, you
  9249.     may wish to remove it from some or all of the fields. To do this you
  9250.     must first select the fields that already have a specified repeat
  9251.     setting. Then you display the Format Report window and choose the button
  9252.     CLEAR REPEAT. When you press OK, the repeat attribute for these fields
  9253.     will be cleared. Once you save the document, these fields will no longer
  9254.     be repeated when the report is generated.
  9255.  
  9256.        Displaying at the Top or Bottom of Pages
  9257.          The normal Header and Footer regions of Surefire documents are
  9258.     always repeated in the top and bottom margin for every page of your
  9259.     document. As a report is generated, you may want different header and
  9260.     footer information displayed at the top or bottom of each report page.
  9261.  
  9262.  
  9263.                           Copyright (c) 1993 Piaf, Inc.
  9264.  
  9265.     Surefire S2.0 User's Guide                                       Page 158
  9266.  
  9267.     This could either be calculated field values or trim data such as column
  9268.     headings. You use a report attribute to have a field displayed at the
  9269.     top or bottom of report pages. This attribute is also set via the Format
  9270.     Report window. Unlike the page Header and Footer, this information is
  9271.     displayed within the margins and only on those pages of the document
  9272.     into which the report is generated.
  9273.  
  9274.          At the left of the text "Display value at top of page", is a
  9275.     logical field. Choose "Y" to indicate that your selected fields will
  9276.     have their values displayed at the top of every page. The exact position
  9277.     will be the same position that the original field is from the top of its
  9278.     page. For example, if one of the fields were at column 50 and 2 lines
  9279.     from the top margin, then its value would always be displayed at column
  9280.     50 and 2 lines from the margin on every page. Any repeated fields would
  9281.     begin below this field on each page.
  9282.  
  9283.          The next setting: "Display value at bottom of every page" is just
  9284.     the opposite. Use this to put field values at the bottom of every page.
  9285.  
  9286.        Displaying at the End of a Report
  9287.  
  9288.          To display text or the value of a field at the end of a report,
  9289.     just make sure that it is located below any repeated fields. Do not give
  9290.     the field any report attributes. As the report is generated, the text
  9291.     and fields will move toward the end of the document. The fields will be
  9292.     evaluated after all data records have been retrieved.
  9293.  
  9294.        Displaying When a Sort Field Changes
  9295.  
  9296.          You may want to display the values of certain fields when a sort
  9297.     field changes. Recall that a sort field is a data field associated with
  9298.     a query line which has a sort order of 1, 2, or 3. The on change
  9299.     attribute is used to mark off groups of data displayed in your report
  9300.     and is especially useful for fields containing @D database functions.
  9301.          The groups of data are determined by the sort field that you
  9302.     choose. For example, if you sort by name, then you will have a new group
  9303.     for each name. Likewise, if you sort by date, then there will be a new
  9304.     group whenever the date changes.  When the cursor is over the on change
  9305.     attribute, you may press (ALT+Z) to zoom a pop-list of possible database
  9306.     fields. You will see the name of each field and its type. You may choose
  9307.     any of these fields. If this particular database field is not used as a
  9308.     sort field when you do a query, the on change attribute will be ignored
  9309.     and the field will not be displayed when the report is generated.
  9310.  
  9311.          As Surefire generates your report, each time that the value of the
  9312.     chosen sort field changes, the field with the on change attribute will
  9313.     be displayed, between the record with the old value and the first record
  9314.     with the new value.
  9315.          Note:  When you start a search without using the Query window, you
  9316.     can specify this attribute for the field where you start the search.
  9317.     Also, fields with this attribute must be located below all repeated
  9318.     fields.
  9319.  
  9320.  
  9321.  
  9322.                           Copyright (c) 1993 Piaf, Inc.
  9323.  
  9324.     Surefire S2.0 User's Guide                                       Page 159
  9325.  
  9326.        Turning off Report Formatting
  9327.  
  9328.          Sometimes you may want to use a document that has report attributes
  9329.     to retrieve records one at a time. If this is the case, you may
  9330.     temporarily turn off report formatting by using an option in the Search
  9331.     Options window. To set this option, follow these steps:
  9332.  
  9333.          1.  Display the Search Options window.
  9334.          Press (ALT+D) to open the Data menu. Choose Search Options... to
  9335.          open the Search Options window.
  9336.  
  9337.          2.  Turn off report formatting.
  9338.          Answer 'N' to the question "Do Report Formatting?". Choose OK to
  9339.          set the change. Choosing OK will tell Surefire that you want the
  9340.          current document to behave as a document without report formatting.
  9341.  
  9342.          3. Display your records.
  9343.          If you press (F8) you will see data records displayed as if there
  9344.          weren't any report attributes. The next time you read the document
  9345.          into Surefire, the report formatting will be turned back on.
  9346.  
  9347.  
  9348.     Generating a Report
  9349.  
  9350.          Once a document has report attributes, you generate the report
  9351.     simply by choosing "Search" from the Data menu or pressing (ALT+S) to
  9352.     start a search.  You can have a query in the Query window or base the
  9353.     search directly on a field. The records that satisfy the query
  9354.     conditions will make up the report.
  9355.  
  9356.          As long as there is enough room in memory to handle the expanded
  9357.     document, you can view the results of your report as soon as all records
  9358.     are retrieved. Since Surefire generates a report directly into a
  9359.     document, it is recommended that you save your document once you have
  9360.     defined all report attributes and before you begin generating the
  9361.     report.
  9362.  
  9363.          Note:  Even before the report is generated you cannot use (F8) and
  9364.     (F7) to sequentially view records when report attributes are specified
  9365.     (and used) for any field.
  9366.  
  9367.          After all records have been retrieved and the report has been
  9368.     generated, your cursor will be repositioned at the place where you
  9369.     started the search. This will typically be at the beginning of the
  9370.     document. You may press the (PageUp) and (PageDown) keys to view your
  9371.     report on the screen.
  9372.  
  9373.          You may stop the report while it is being generated by pressing an
  9374.     'S' at any time. After it is stopped, you may view, edit, and print just
  9375.     as if the report generation had gone to completion. Sometimes you may
  9376.     set up a query intended to generate a long printed report. Before
  9377.     printing it, you may generate a few pages, then stop it and look at it
  9378.     to make sure it is really what you want. Then, after you are sure, do
  9379.     the Search & Print to generate the full report directly onto paper.
  9380.  
  9381.                           Copyright (c) 1993 Piaf, Inc.
  9382.  
  9383.     Surefire S2.0 User's Guide                                       Page 160
  9384.  
  9385.          Note:   If the number of retrieved records is very large, there
  9386.     may not be sufficient memory to view the entire report. You will be able
  9387.     to see as much of the report as possible. If memory is exhausted, a
  9388.     message window will be displayed. You must use Search & Print to print
  9389.     the entire report.
  9390.  
  9391.          After a report is generated, all fields with report attributes are
  9392.     temporarily deleted from the document by Surefire. This happens because
  9393.     the purpose of these fields is solely to indicate to Surefire how to
  9394.     present the information in the report. Once the report is generated,
  9395.     these fields would just get in the way.
  9396.  
  9397.          The other fields that do not have report attributes remain intact
  9398.     for your use. If you had generated the report in the middle of some
  9399.     larger document, these other fields may still be used to search the
  9400.     database or perform calculations before you print the report. Button
  9401.     fields are very handy to have around. You can use buttons to re-generate
  9402.     the report based on specific named queries. In fact, buttons in report
  9403.     documents can be an essential part of a Smart document application.
  9404.  
  9405.  
  9406.     Resetting a Report
  9407.  
  9408.          Generally you want to re-get your document each time after you run
  9409.     a report. This is because the generation of a report automatically edits
  9410.     your document by inserting lines and moving text and fields.  You can
  9411.     then further edit your report manually if you wish.  But, when you want
  9412.     to generate your report another time, usually with a slightly different
  9413.     query, you must start with the original document.
  9414.  
  9415.          When you get a document using the Get File window, Surefire does
  9416.     not remember information about the query or search you have just
  9417.     performed. By choosing "Reset" from the File menu instead, you can tell
  9418.     Surefire to get the document again but leave the current query
  9419.     information intact.
  9420.  
  9421.          The is handy especially when you are testing the look of a report
  9422.     generated from a complex query. You can keep making minor changes to the
  9423.     query each time, and generate the report again and again until you are
  9424.     satisfied. This certainly overcomes the inconvenience of getting the
  9425.     report document and redefining a query each time you generate a report.
  9426.  
  9427.  
  9428.     Printing a Report
  9429.  
  9430.          There are two ways that a report may be printed. You can print a
  9431.     report after having a chance to view and annotate it on the screen. Or,
  9432.     you can tell Surefire to directly print the report as it is generated.
  9433.     Both ways assume that you have already defined the appropriate report
  9434.     attributes as described earlier in this chapter.
  9435.  
  9436.  
  9437.  
  9438.  
  9439.  
  9440.                           Copyright (c) 1993 Piaf, Inc.
  9441.  
  9442.     Surefire S2.0 User's Guide                                       Page 161
  9443.  
  9444.        Printing After Display
  9445.  
  9446.          Quite often you may want to generate a report, but then add text to
  9447.     explain specific results, organize the text a little differently, or
  9448.     delete portions of it that are really not of interest. In Surefire, all
  9449.     you need to do is be in Text edit mode after the report  is generated.
  9450.     You can manipulate the result all you want using Surefire's word
  9451.     processing capabilities. Then, when you are ready, you can print the
  9452.     document.
  9453.  
  9454.          To print the report once it is viewed on screen, and you are in
  9455.     Text edit  mode, choose "Print..." from the File menu to open the Print
  9456.     window. Then choose PRINT. This is exactly the way that any other
  9457.     document is printed. If there are any button fields in your document,
  9458.     the button labels will be removed in Text edit mode and will not be
  9459.     printed.
  9460.  
  9461.        Printing the Report Directly
  9462.  
  9463.          You can generate a report in such a way that it is printed at the
  9464.     same time. This is especially useful if your report is larger than
  9465.     memory allows.  Before you do, be sure the report will be what you want,
  9466.     since printing often takes a long time. First, generate a few pages
  9467.     without printing and then stop it by typing an 'S'. When everything
  9468.     looks good, you're ready to go.
  9469.  
  9470.          To print the report directly while it is being generated, you first
  9471.     build your query in the Query window if you haven't already done so, or
  9472.     get a named query. Then choose "Print..." from the File menu. Choose
  9473.     SEARCH & PRINT. Surefire will qualify matching records according to the
  9474.     query conditions, generate the report and print the entire document. Of
  9475.     course, you have the option of stopping the print operation at any time.
  9476.  
  9477.  
  9478.     Saving a Report
  9479.  
  9480.          The generation of a report automatically edits your document by
  9481.     inserting lines and moving text and fields. It also deletes those fields
  9482.     that have report attributes. Once a report is generated, the document
  9483.     can not directly be used to generate another report. Only the original
  9484.     document can be used again and again to generate different reports.
  9485.     Therefore, when you are ready to save your report, Surefire insists that
  9486.     you save only the textual form of your document as a Report  or as a
  9487.     Text File.  Neither of these will retain field information.
  9488.  
  9489.          Saving as a Report will preserve the margins and special characters
  9490.     of a document. This is the option you will normally use. Saving as a
  9491.     Text File or General WP will save only the text of your report in ASCII
  9492.     format. This may be just what you want if you are going to send the
  9493.     report over a modem to someone who has a different word processor, for
  9494.     example.
  9495.  
  9496.          You use the Save File window from the File menu and enter the name
  9497.     by which you want your finished report to be saved. Set the file type
  9498.  
  9499.                           Copyright (c) 1993 Piaf, Inc.
  9500.  
  9501.     Surefire S2.0 User's Guide                                       Page 162
  9502.  
  9503.     multiple choice button to Report to specifically save the report without
  9504.     overwriting the original document. Then, give the report a name that is
  9505.     different than the name of the original document.
  9506.  
  9507.  
  9508.     Using Statistical Database Functions
  9509.  
  9510.          You can use the functions shown below in field commands to perform
  9511.     statistical calculations on field values that span more than one
  9512.     database record:
  9513.  
  9514.               Use function   To
  9515.  
  9516.               @DSUM          Find the sum of values for a field.
  9517.               @DAVG          Find the average of values for a field.
  9518.               @DCOUNT        Find the number of records retrieved so far
  9519.                              (for a group).
  9520.               @DMIN          Find the minimum value of a field.
  9521.               @DMAX          Find the maximum value of a field.
  9522.               @DTOTAL        Find the total number of records for the
  9523.                              current query.
  9524.  
  9525.          These functions are often used in combination with fields that have
  9526.     an on change attribute to display statistical information based on
  9527.     groups of your report data. For example, you may want the total number
  9528.     of recipes that use apples, the average salary of employees in each
  9529.     department of a company, or the oldest and youngest people in your
  9530.     database.  These functions are described in "Appendix A: Surefire
  9531.     Function Reference".
  9532.  
  9533.  
  9534.     Generating Reports at the Push of a Button
  9535.  
  9536.          With a button field and the @RESET function, you can perform the
  9537.     same operation as choosing "Reset" from the File menu. This operation
  9538.     allows you to re-get the current document after a report has been
  9539.     generated in such a way that current query information is not cleared.
  9540.     This way you can generate a report, reset the document, and then just
  9541.     change a query condition before regenerating the report. However, by
  9542.     itself, it may not be worth having a button field in your report just to
  9543.     support a menu shortcut.
  9544.  
  9545.          A real handy extension to this idea is to have one or more buttons
  9546.     set up at the top of your report to generate varieties of the same
  9547.     report. This can be done by using field commands with the @QUERY()
  9548.     function. The @QUERY() function will do a reset operation automatically
  9549.     if a report was generated. It will then start a database search based on
  9550.     the named query specified by its argument.  For example, in our
  9551.     "conrept" document, you can have one button generate a report for the
  9552.     tri-state area of N.Y., N.J., and Connecticut. Another button can
  9553.     generate the report for the entire U.S., alphabetically by state. And so
  9554.     on.
  9555.  
  9556.  
  9557.  
  9558.                           Copyright (c) 1993 Piaf, Inc.
  9559.  
  9560.     Surefire S2.0 User's Guide                                       Page 163
  9561.  
  9562.     Multiple Field Selection with the Mouse
  9563.  
  9564.          To select more than one field to have report attributes, you can use
  9565.     the mouse to define the upper left and lower right corners of a rectangle
  9566.     containing the desired fields.
  9567.  
  9568.          First move the mouse to the left side of the upper leftmost field,
  9569.     Click and choose Field Select from the Edit menu. Now, move the mouse
  9570.     to the right edge of the lower rightmost field and Click. Be sure that
  9571.     the rectangle fully contains the fields and/or cells that you want. Now
  9572.     choose "Format Report" from the Data menu and follow the procedures
  9573.     described earlier in this chapter.
  9574.  
  9575.  
  9576.  
  9577.  
  9578.  
  9579.  
  9580.  
  9581.  
  9582.  
  9583.  
  9584.  
  9585.  
  9586.  
  9587.  
  9588.  
  9589.  
  9590.  
  9591.  
  9592.  
  9593.  
  9594.  
  9595.  
  9596.  
  9597.  
  9598.  
  9599.  
  9600.  
  9601.  
  9602.  
  9603.  
  9604.  
  9605.  
  9606.  
  9607.  
  9608.  
  9609.  
  9610.  
  9611.  
  9612.  
  9613.  
  9614.  
  9615.  
  9616.  
  9617.                           Copyright (c) 1993 Piaf, Inc.
  9618.  
  9619.     Surefire S2.0 User's Guide                                       Page 164
  9620.  
  9621.     Chapter 23     -    More About Printing
  9622.  
  9623.          When you have finished editing a document, or you have just
  9624.     generated a report, you usually want to print it so that you can have a
  9625.     paper copy.  Paper copies are needed for mailing and may also be part of
  9626.     your record keeping procedures.
  9627.  
  9628.          By now you are quite familiar with printing a document in Surefire.
  9629.     The features of the Print window were introduced quickly in the word
  9630.     processing chapters.  This chapter reviews some information you already
  9631.     know, as well as printing options not thoroughly discussed earlier. In
  9632.     addition, this chapter explains available fonts and printer drivers and
  9633.     how to configure Surefire with a particular printer.
  9634.  
  9635.  
  9636.     The Print Window
  9637.  
  9638.          You use the Print window to print Surefire documents and reports.
  9639.     The settings allow you to select which pages of your document to print,
  9640.     how to number those pages and whether your printer is set up for manual
  9641.     sheet feeding. The following sections describe each of these settings
  9642.     and the two action buttons that may be used to print your documents and
  9643.     reports.
  9644.  
  9645.        Pages to Print
  9646.  
  9647.          You can specify which pages of a document are to be printed. You do
  9648.     this by changing values in two entry fields of the Print window to the
  9649.     right of the label "Print from Page:". The default is "1 To: END" which
  9650.     means print the entire document.
  9651.  
  9652.          If you change these values, only certain pages of a document will
  9653.     be printed. The number in the first field must have a lower value than
  9654.     the number in the second field. For example, "2 to 7" says print the
  9655.     second through the seventh pages of the current document. Page selection
  9656.     is useful, if you want to revise part of a document or to substitute a
  9657.     corrected page into a printed document.
  9658.  
  9659.        Page Numbering
  9660.  
  9661.          You may also select the starting page number for the first page
  9662.     that is printed. This will be the number printed in the header or footer
  9663.     for the first page if you have enabled page numbering. Read "Chapter 9:
  9664.     Page Layout"  for details about page numbering in headers and footers.
  9665.  
  9666.          For example, say the current document has 10 pages which are
  9667.     numbered 1 through 10. But this document really represents chapter 2 of
  9668.     a longer project, and the last page of chapter 1 is 14.  You still want
  9669.     to print this entire document, but the starting page number should be
  9670.     15.  To set this, change the value in the field to the right of "Start
  9671.     Numbering:".  The default value is "1".  So, you would type "15" in
  9672.     place of the "1".
  9673.  
  9674.  
  9675.  
  9676.                           Copyright (c) 1993 Piaf, Inc.
  9677.  
  9678.     Surefire S2.0 User's Guide                                       Page 165
  9679.  
  9680.          If you choose PRINT now, the 10 pages of the document will be
  9681.     printed with the page numbers 15, 16, ... 24. As in our example, this
  9682.     feature is useful for printing chaptered text where each document
  9683.     represents a chapter but the page numbers must be continuous as if there
  9684.     were really a single larger document.
  9685.  
  9686.        Number of Copies
  9687.  
  9688.          You can select the number of copies of the current document that
  9689.     you want printed at one time.  This means that after one copy of your
  9690.     document is sent to the printer, Surefire will send additional copies
  9691.     without you having to choose PRINT more than once. You will not be able
  9692.     to resume other operations in Surefire until all copies have been sent.
  9693.  
  9694.          To set the number of copies, change the value in the field
  9695.     following the label "How Many Copies:".  The default is 1.
  9696.  
  9697.          Note:   Do not confuse this with instances of a document that are
  9698.     formed during a merge. If you set this to be greater than 1 you will
  9699.     have more than one copy of each instance of a document. See the
  9700.     explanation of SEARCH & PRINT below.
  9701.  
  9702.        Pause Before Printing
  9703.  
  9704.          Some printers do not have automatic sheet feeders. If yours does
  9705.     not, you still may want to print onto a single sheet of paper, with a
  9706.     company letterhead, for example. You can tell Surefire that this is your
  9707.     intention if you say "Yes" to the Print window question "Pause before
  9708.     each page?". You must do this prior to choosing OK in the Print window.
  9709.     This will cause printing to automatically stop before each page is
  9710.     printed so that you can load a sheet of paper.
  9711.  
  9712.          If you are going to be using paper that is not on a continuous feed
  9713.     (i.e. tractor feed), you should also read the section later in this
  9714.     chapter entitled "Tractor Feed vs Sheet Feed". This section covers
  9715.     additional considerations for setting number of lines per page, margin
  9716.     adjustments, etc.
  9717.  
  9718.        PRINT and SEARCH & PRINT
  9719.  
  9720.          These action buttons will start a print operation of the currently
  9721.     displayed document. PRINT allows you to print the current document with
  9722.     any data that is currently displayed in fields of the document.  PRINT
  9723.     will be your selection unless you are merging data or generating a
  9724.     report. Normally, the cursor is positioned on this button when the Print
  9725.     window is displayed.
  9726.  
  9727.          SEARCH & PRINT will merge data from a database according to the
  9728.     currently defined query into the fields of your document. This will
  9729.     usually result in the printing of multiple instances of your document
  9730.     with different sets of data. You may read "Chapter 19: Forms and Form
  9731.     Letters" and "Chapter 22: Generating Reports"  for specific instructions
  9732.     on using this feature.
  9733.  
  9734.  
  9735.                           Copyright (c) 1993 Piaf, Inc.
  9736.  
  9737.     Surefire S2.0 User's Guide                                       Page 166
  9738.  
  9739.     Printing the Current Document
  9740.  
  9741.          If a report, text file or document is not currently displayed in
  9742.     Surefire, you must first read it into Surefire to be printed. If you are
  9743.     not familiar with the steps for reading a document, read the section
  9744.     "Opening a Document" in Chapter 5. You use the Print window, setting
  9745.     options as appropriate and choose PRINT to print your document to the
  9746.     current printer.  You may also use the print file shortcut (ALT+F6) to
  9747.     print the currently displayed document without opening the Print window
  9748.     and without changing any default print window options.
  9749.  
  9750.          PRINT will print your document, just as you see it. This varies
  9751.     depending on whether you are using the document (use mode), editing the
  9752.     document (Document edit mode) or editing text (Text edit mode). The
  9753.     difference is solely based on how the fields are represented.  In use
  9754.     mode, the fields contain their current values and all the fields are
  9755.     printed with underlines. No autosizing of fields will take place. In
  9756.     Text edit mode, all field values are in textual form and any autosizing
  9757.     will have been done. The fields will not be underlined. And finally, in
  9758.     Document edit mode, all fields are underlined and filled with a
  9759.     character indicating their type. No autosizing will take place and no
  9760.     values will be printed.
  9761.  
  9762.          SEARCH & PRINT will always switch to Text edit mode just before
  9763.     printing is done. Therefore, field values are autosized and printed
  9764.     without underlines.
  9765.  
  9766.     Stopping and Starting the Printer
  9767.  
  9768.          When printing begins, a window is displayed with the following
  9769.     message:  "Printing in Progress - Type S to stop". This window will go
  9770.     away after the document is printed. If printing cannot be started, a
  9771.     message will say so. If this happens, you need to be sure that the
  9772.     printer is turned on and is hooked up properly.
  9773.  
  9774.          If you type "S", the information being sent to the printer is
  9775.     temporarily suspended.  The printer may continue for a while to complete
  9776.     what was already sent to it.  The following message is then displayed:
  9777.     "You have stopped printing.  Abort?" At this time you can prevent
  9778.     anything more from being sent to the printer by choosing YES.  If your
  9779.     printer keeps printing, you can stop it by resetting it or turning it
  9780.     off. Choosing NO will allow printing to continue from exactly where it
  9781.     stopped.
  9782.  
  9783.     Printers and Printer Drivers
  9784.  
  9785.          Surefire comes with several printer drivers. Before you print any
  9786.     Surefire document, you must select the appropriate driver for your
  9787.     printer. As long as you do not switch printers, you do not need to
  9788.     select your driver after you initially install and setup Surefire. An
  9789.     option on the Setup window may be used to select your printer. You can
  9790.     display the Setup window from the File menu.
  9791.  
  9792.  
  9793.  
  9794.                           Copyright (c) 1993 Piaf, Inc.
  9795.  
  9796.     Surefire S2.0 User's Guide                                       Page 167
  9797.  
  9798.          Here is a table of the available drivers and the printers with
  9799.     which they work. The available fonts with the character widths in cpi
  9800.     (characters per inch) are also shown. The fonts corresponding to the
  9801.     current printer driver are seen in the Format window. This window is
  9802.     accessed from the Page menu.
  9803.  
  9804.     Driver         Printers                 Fonts/cpi
  9805.  
  9806.     PLAIN          (dumb)                   default/10
  9807.  
  9808.     ANSII          ANSII Standard           Pica/10, Elite/12
  9809.  
  9810.     DIABLO         Diablo 630               Pica/10, Elite/12,
  9811.                                             Condensed/12, Brother HR Series
  9812.  
  9813.     RICOH408       Ricoh LP4080R            Courier/10, Prestige Elite/12,
  9814.                                             Letter Gothic/15
  9815.  
  9816.     IBMPRO         IBM Proprinter Series    Pica/10, NLQ/10, Elite/12,
  9817.                                             NLQ/12, Condensed/17.1
  9818.  
  9819.     IBMGRAPH       IBM Graphics Printer     Pica/10, NLQ/10,
  9820.                    AT&T 473/478             Elite/12, NLQ/12,
  9821.                    Okidata 92/192, 93/193   Condensed/17.1
  9822.  
  9823.     EPSONRX        Epson RX Series          Pica/10, Pica Dbl+Emp/10,
  9824.                    Epson MX Series          Elite, Elite Dbl+Emp/12,
  9825.                                             Compressed/17.16
  9826.  
  9827.     EPSONFX        Epson FX Series          Pica/10, NLQ/10,
  9828.                    Epson LX Series          Condensed/17, Wide/5
  9829.  
  9830.     EPSONLQ        Epson LQ Series          Pica/10, Elite/12,
  9831.                    Epson SQ2500             Condensed/17, Cond. Elite/20
  9832.  
  9833.     HPLASER        HP LaserJet Family       10 Pitch/10, 12 Pitch/12,
  9834.                    Apricot Laser            16.66 Pitch/16.66
  9835.                    Epson GQ3500
  9836.                    Kyocera F-1010 Laser
  9837.                    Nec Silentwriter Series
  9838.                    Okidata Laserline 6
  9839.                    Olivetti PG 208 M2
  9840.                    Quadram QuadLaser 1
  9841.                    Tandy LP-1000
  9842.                    Tegra Genisis
  9843.                    Wang LDP 8
  9844.  
  9845.  
  9846.          Even if your printer is not shown in the table, your printer will
  9847.     likely still work with one of the above drivers. You need to know if
  9848.     your printer emulates another printer as many do. For example, it is
  9849.     very common for daisy wheel printers to emulate Diablo printers, dot
  9850.     matrix printers to emulate Epson printers, and laser printers to emulate
  9851.     HP LaserJet printers.
  9852.  
  9853.                           Copyright (c) 1993 Piaf, Inc.
  9854.  
  9855.     Surefire S2.0 User's Guide                                       Page 168
  9856.  
  9857.          If your printer does emulate another printer, then you should set
  9858.     the printer to use the emulation and select the printer driver in
  9859.     Surefire that corresponds to the emulated printer. If necessary, read
  9860.     your printer manual on supported emulation modes and how to set them.
  9861.  
  9862.          All the printer drivers listed in the table support underline and
  9863.     bold attributes. The only exception is PLAIN. The PLAIN driver supports
  9864.     the least intelligent printers. It neither supports attributes nor
  9865.     multiple fonts. If your printer does not support the IBM extended
  9866.     character set, you will not be able to print lines or special
  9867.     characters. Some printers particularly laser printers, will need to have
  9868.     this character set loaded. Consult you printer manual for more
  9869.     information on supported attributes and character sets.
  9870.  
  9871.     What Actually Gets Printed
  9872.  
  9873.          Printers with tractor feed allow you to print the full length of
  9874.     the page. That is, all 66 lines on an 8-1/2 by 11 sheet can have text.
  9875.     In this case, formatting your page with Surefire is very
  9876.     straight-forward. Use the Format window to set the page size to 8-1/2 by
  9877.     11 inch pages as was explained already in "Chapter 9: Page Layout". You
  9878.     can specify your margins and font without worrying about any other
  9879.     considerations.
  9880.  
  9881.          Sometimes, you may want to feed 8-1/2 by 11 inch sheets of paper
  9882.     into you printer individually or with an automatic sheet feeder. This is
  9883.     often done to print letters on a company letterhead or to use other
  9884.     paper that may not be available for tractor feed. The problem is, most
  9885.     printers can't print the full 66 lines on a sheet-fed page. This is
  9886.     because the paper must be fed past the print head and held in place by
  9887.     the rollers in order to start printing. This is very similar to a
  9888.     typewriter.  As a result, somewhat fewer than 66 lines are really
  9889.     available.
  9890.  
  9891.          To compensate for the inability of a printer to printer all 66
  9892.     lines of a page, the format of your document must be adjusted. You can
  9893.     do this by following these steps:
  9894.  
  9895.     Step 1: How may lines?
  9896.  
  9897.          Determine how many lines can be printed on a sheet. Most often this
  9898.     information can be found in your printer manual. It may tell you how
  9899.     much space is skipped at the top and bottom of the page. Subtracting
  9900.     these amounts from 11 inches will give you the printable length of the
  9901.     page.
  9902.  
  9903.          Sometimes it may not be clear from the printer manual, or you don't
  9904.     have the manual. You can determine exactly how many lines can be
  9905.     printed, and exactly how much space is left at the top and bottom as
  9906.     follows:
  9907.  
  9908.          1. Open a new document.
  9909.          Choose New from the File menu to start a new document.
  9910.  
  9911.  
  9912.                           Copyright (c) 1993 Piaf, Inc.
  9913.  
  9914.     Surefire S2.0 User's Guide                                       Page 169
  9915.  
  9916.          2. Set the page length.
  9917.          Choose Format... from the Page window to display the Format window.
  9918.          Set the page length in the Format window to 8-1/2 by 11 and set the
  9919.          top and bottom margins to 0.
  9920.  
  9921.          3. Number the lines
  9922.          Number the lines of your page from 1 to 66.
  9923.  
  9924.          4. Print a test page.
  9925.          Choose PRINT from the Print window to print a test page, using
  9926.          sheet feeding on your printer.
  9927.  
  9928.          The number of lines printed on the page will be what your printer
  9929.     can physically print. Dividing this number by 6 will give you the length
  9930.     of the print region in inches. You can measure the amount of space
  9931.     skipped at the top and bottom with a ruler.  Now you know everything you
  9932.     need to know to format your document so that it comes out as you expect.
  9933.     Write down the size of the actual print region, and the space skipped at
  9934.     the top and bottom of the page for future reference.
  9935.  
  9936.     Step 2:  Set the page length.
  9937.  
  9938.          In the Format window, set the page length to correspond to the
  9939.     number of lines that can be physically printed on a page. To do this,
  9940.     choose "Specific Setting:" for the value of the page size multiple
  9941.     choice button in the Format window. You will notice that two additional
  9942.     entry fields are now visible just to the right. Move the cursor to the
  9943.     "Length:" field and type in the length you determined in Step 1 above.
  9944.  
  9945.     Step 3: Adjust the margins.
  9946.  
  9947.          Using the data entry fields in the Format window, adjust the top
  9948.     and/or bottom margins smaller to account for the extra space that is on
  9949.     a page. To do this, first subtract the amount you measured at the top of
  9950.     the page from the current top margin. Then, subtract the amount of space
  9951.     from the bottom of the page from the current bottom margin.
  9952.  
  9953.     Step 4: Reformat the document.
  9954.  
  9955.          Now choose OK in the Format window to reformat your document.  You
  9956.     will immediately notice that the document may now take up more pages
  9957.     than before since less text can fit on each page. You can now review
  9958.     your document. Each page will correspond to the page as it will be
  9959.     printed, except a little extra space will be at the top and bottom of
  9960.     the page. Save your document to retain the new formatting if you desire.
  9961.  
  9962.     Step 5: Print the document.
  9963.  
  9964.          Now you can load your first sheet of paper, align it horizontally
  9965.     and print. If you are feeding paper manually, just load the next page
  9966.     after the previous one is ejected, making sure your printer is on-line.
  9967.     See your printer manual for more information about how your particular
  9968.     printer behaves.
  9969.  
  9970.  
  9971.                           Copyright (c) 1993 Piaf, Inc.
  9972.  
  9973.     Surefire S2.0 User's Guide                                       Page 170
  9974.  
  9975.     Print or Search & Print to a File
  9976.  
  9977.          If you specify a file name in the Deferred File field of the Print
  9978.     window and choose PRINT or SEARCH & PRINT, Surefire will "print" the
  9979.     current document to that file. All printer codes will remain intact and
  9980.     be written to the file. This will enable you to Print that file from the
  9981.     DOS prompt at a later time.
  9982.  
  9983.          If you choose a printer of type TEXT in the Setup Window, then this
  9984.     deferred file will be readable by most text editors.
  9985.  
  9986.  
  9987.  
  9988.  
  9989.  
  9990.  
  9991.  
  9992.  
  9993.  
  9994.  
  9995.  
  9996.  
  9997.  
  9998.  
  9999.  
  10000.  
  10001.  
  10002.  
  10003.  
  10004.  
  10005.  
  10006.  
  10007.  
  10008.  
  10009.  
  10010.  
  10011.  
  10012.  
  10013.  
  10014.  
  10015.  
  10016.  
  10017.  
  10018.  
  10019.  
  10020.  
  10021.  
  10022.  
  10023.  
  10024.  
  10025.  
  10026.  
  10027.  
  10028.  
  10029.  
  10030.                           Copyright (c) 1993 Piaf, Inc.
  10031.  
  10032.     Surefire S2.0 User's Guide                                       Page 171
  10033.  
  10034.     Chapter 24     -    More About Surefire Documents
  10035.  
  10036.          As you know, the basic entity of Surefire is the document.
  10037.     Documents may contain text, text and fields, and may be associated with
  10038.     a database. Fields of a document may contain field commands that make
  10039.     documents smarter and quite powerful. Documents may be used for data
  10040.     entry and reporting and may even evolve into complete applications by
  10041.     "linking" Smart Documents together.
  10042.          Depending upon their complexity, documents actually consist of one
  10043.     or more DOS files which are managed by Surefire as a group.  As you
  10044.     edit, use and maintain a document, Surefire assures that all associated
  10045.     files are changed accordingly.  This chapter will serve as a place to
  10046.     review much of what you have learned about documents. You will also
  10047.     learn more about how other associated files are managed by Surefire.
  10048.  
  10049.  
  10050.     The Modes of Editing and Using Documents
  10051.  
  10052.          If your document contains only text, you may only edit this text.
  10053.     That is, you may only perform normal word processing operations such as
  10054.     text insertion, deletion, find, replace, etc. In Surefire this is known
  10055.     as Text edit  mode. There are also times when you have a document with
  10056.     fields but you want to edit the document along with the field values as
  10057.     text. To do this, you choose "Text" on the Operate menu. The Operate
  10058.     menu always shows the current mode of editing or use by preceding that
  10059.     choice with an 'X'. When you are only editing the text of a document,
  10060.     the Operate menu looks like the picture at the left.
  10061.  
  10062.          In the chapter "Introduction to Fields", you learned about using
  10063.     fields in a document. Documents which contain fields may be edited as
  10064.     text in Text edit, mode or as a document in Document edit mode. In the
  10065.     latter case, Surefire maintains information about the placement of
  10066.     fields. When Surefire is in Document edit mode, you can manipulate
  10067.     fields as well as perform all the normal word processing operations that
  10068.     are available in Text edit mode.
  10069.  
  10070.          A document with fields may Used.  This concept of using a document
  10071.     was covered in greater detail throughout this manual. Using a document
  10072.     is what really distinguishes a Smart document from an ordinary document.
  10073.     When you use a document, you enter, view and manipulate the values in
  10074.     fields instead of the layout or text of the document. While using a
  10075.     document, you may only change field values. The Operate menu reflects
  10076.     this mode as well.
  10077.  
  10078.  
  10079.     Getting Documents
  10080.  
  10081.          When you get a document, Surefire will display the first page of
  10082.     the document with the margins that were set the last time you displayed
  10083.     it. Surefire will also read in files that define fields or data
  10084.     associated with the document.
  10085.  
  10086.  
  10087.  
  10088.  
  10089.                           Copyright (c) 1993 Piaf, Inc.
  10090.  
  10091.     Surefire S2.0 User's Guide                                       Page 172
  10092.  
  10093.          You may get a document by specifying the name of the document along
  10094.     with the Surefire command at the DOS prompt:
  10095.  
  10096.          > SUREFIRE  MYDOC
  10097.  
  10098.          You may also type the name of the document in the Get File window
  10099.     (from the File menu).  This window shows the current directory. This is
  10100.     the directory where Surefire will look for a document.  This is the DOS
  10101.     directory that was set during Surefire installation or most recently
  10102.     specified in the Setup window.  If a document has more than one
  10103.     associated file, all these files must be in the current directory.
  10104.  
  10105.          The Get File window has a multiple choice button that allows you to
  10106.     get a document, get a text file, or to import a data file. Just to the
  10107.     right of the label "Name:", is the field you use to enter the name of
  10108.     your document or file. If the multiple choice is set to Document, no
  10109.     file extension (such as .DOC) is needed and formatting and margin
  10110.     information will be preserved. See "Chapter 25: Surefire System Topics"
  10111.     for a complete description of all Surefire file extensions.
  10112.  
  10113.          The multiple choice button on the Get File window also has choices
  10114.     for Text File and Data File.  The Text File choice allows you to read in
  10115.     a file created by another word processor or text editor. The Data choice
  10116.     allows data from another program to be imported into the current
  10117.     document's database. The import process is described in "Chapter 19:
  10118.     Advanced Database Topics".
  10119.  
  10120.          If the multiple choice button is set to Text File, Surefire will
  10121.     search for the named file and assume it is an ASCII file with no special
  10122.     formatting information. If the name has no period '.' or other
  10123.     extension, Surefire assumes the extension ".TXT". For this type of file,
  10124.     the margins will be set to the current margins at the time of the Get.
  10125.  
  10126.          By pressing the Zoom key (ALT+Z) when the cursor is on the file
  10127.     name entry field, a pop-list of all documents, text or data files will
  10128.     appear. Text files with the extension ".TXT" will be shown when the
  10129.     chosen file type is Text File. Likewise, ASCII data files with the
  10130.     extension ".DTA" will be shown when the file type is Data File.
  10131.     Otherwise, documents will be listed. As with all pop-lists in Surefire,
  10132.     you may press the (down arrow) key to move the cursor to the document or
  10133.     file that you want and press (Enter) to choose it.  If you do not wish
  10134.     to make a choice, you simply press (Esc).
  10135.  
  10136.          The pop-list showing documents has additional important information
  10137.     about each particular document. The date and time that the document was
  10138.     last saved is always displayed.  But, there is additional information
  10139.     for documents containing fields and databases. The 'Y' in the first
  10140.     column indicates that the document has fields. A 'Y' in the second
  10141.     column tells you that the document is a base document that defines a
  10142.     database. A 'P' in the second column indicates that the document has
  10143.     fields projected from another database. The number of documents that
  10144.     project data from a base document are shown in the third column.
  10145.  
  10146.  
  10147.  
  10148.                           Copyright (c) 1993 Piaf, Inc.
  10149.  
  10150.     Surefire S2.0 User's Guide                                       Page 173
  10151.  
  10152.     Saving Documents
  10153.  
  10154.          In the Save File window there are 5 possible file types from which
  10155.     you may choose. They are Document, Report, Text File, General WP and
  10156.     Data.  Whatever file type you choose, Surefire will save that file or
  10157.     document in the current directory.
  10158.  
  10159.          If you choose Document, Surefire will save the current document and
  10160.     any files associated with it. It will remember graphic attributes and
  10161.     header, footer and margin information as well. If Text File or General
  10162.     WP is your choice, only a textual version of the document will be saved
  10163.     as ASCII text. No graphic attributes (see "Chapter 8: Adding Emphasis")
  10164.     or formatting information such as margins will be saved.  Special
  10165.     characters will be saved but may not be kept intact by other programs.
  10166.  
  10167.          In a Text File, each line of the Surefire document will be
  10168.     terminated with a newline character (CR-LF). This format is recognized
  10169.     by various text editors as well as DOS commands such as type.
  10170.  
  10171.          General WP is similar to Text File, however, there will not be a
  10172.     newline character after each line. Surefire will terminate every
  10173.     paragraph with a single newline character so that a paragraph will
  10174.     become a very long line. This format is recognized by many word
  10175.     processors and will ensure that words in a paragraph are properly
  10176.     wrapped when imported. In addition, Surefire will replace leading spaces
  10177.     on each line by (Tab) characters. This will be based on the current tab
  10178.     size you have set in the Setup window.
  10179.  
  10180.          You may choose to save a document as a Report when you want to keep
  10181.     the graphic attributes and formatting information but not any associated
  10182.     field information. Surefire will look to see if there are already
  10183.     documents with the same name that have fields or a database. If so, you
  10184.     must choose a different name. Saving a document this way is useful when
  10185.     you wish to annotate a document after you view data records, without
  10186.     losing the correspondence between the document and its fields.
  10187.  
  10188.          Use Data File when you want to export data from a Surefire database
  10189.     to another program. See "Chapter 21: Advanced Database Topics" for a
  10190.     thorough description of importing and exporting data.
  10191.  
  10192.  
  10193.     Copying Documents
  10194.  
  10195.          You can use the Get File and Save File window to copy files or
  10196.     documents. Just Get the desired file or document and Save it directly
  10197.     with a different name. If you are copying a document with fields, your
  10198.     copy will have the same format and fields as the original.  The fields
  10199.     of the copy will have the same attributes, names, sizes, layout and
  10200.     field commands as in the original document.
  10201.          If the original document is a base document defining a database,
  10202.     your copy will not include a copy of the database data. Its fields,
  10203.     however, will be defined so that you can add or import data to create a
  10204.     new database. This database will have the same structure as the database
  10205.     of the original document. Since the format of the copy is the same, it
  10206.  
  10207.                           Copyright (c) 1993 Piaf, Inc.
  10208.  
  10209.     Surefire S2.0 User's Guide                                       Page 174
  10210.  
  10211.     is a simple matter to copy the data from the original document's database
  10212.     to the new database. All that you need to do is to export some or all of
  10213.     the data from the original and import that data into the copy.
  10214.  
  10215.     See "Chapter 21: Advanced Database Topics" for complete information on
  10216.     importing and exporting data.
  10217.  
  10218.  
  10219.     Renaming Documents
  10220.  
  10221.          If you want to rename a Surefire document, use the Rename File
  10222.     window. The Rename File window has two data entry fields. Type the
  10223.     current name of the file or document in the first field next to the
  10224.     label "Old Name:". You may press (ALT+Z) to show the pop-list of files
  10225.     in the Current Directory. Enter the desired new name in the second field
  10226.     next to the label "New Name:".
  10227.  
  10228.          The rename within Surefire works differently than a DOS rename
  10229.     command (ren). If the file type is Document, Surefire will rename all
  10230.     associated files that define fields or a database, as well as the
  10231.     document itself. In addition, Surefire will not allow you to rename a
  10232.     file to a name that is already used.
  10233.  
  10234.          A message window will be displayed if you try to rename a base
  10235.     document that has associated projected documents. At the time of the
  10236.     warning, you may choose to CANCEL the rename. If you continue with the
  10237.     rename in this case, you will need to modify each of the projected
  10238.     documents to reference the new name. (Use the Field Modify window from
  10239.     the Field menu to do this).
  10240.  
  10241.  
  10242.     Deleting Documents
  10243.  
  10244.          If you want to delete a Surefire document, use the Delete File
  10245.     window. The Delete File window has a data entry field where you can type
  10246.     the name of the file or document that you wish to delete. You may press
  10247.     (ALT+Z) to show the pop-list of files in the current directory.
  10248.  
  10249.          Note:   The Delete operation within Surefire works differently than
  10250.     a DOS delete command (del). If the file type is Document, Surefire will
  10251.     delete all associated files such as those that define fields or a
  10252.     database, as well as the document itself. No matter what the file type
  10253.     is, a message window will be displayed to make sure that you really want
  10254.     to continue with the delete operation.
  10255.  
  10256.          A special message window will be displayed if you try to delete a
  10257.     base document that has associated projected documents. At the time of
  10258.     the warning, you may choose to CANCEL the delete. If you continue with
  10259.     the delete in this case, you will need to modify each of the projected
  10260.     documents to remove all references to fields projected from the deleted
  10261.     document. You can either delete all of the projected fields or use the
  10262.     Field Modify window to remove all references to the deleted document.
  10263.  
  10264.  
  10265.  
  10266.                           Copyright (c) 1993 Piaf, Inc.
  10267.  
  10268.     Surefire S2.0 User's Guide                                       Page 175
  10269.  
  10270.     Creating New Documents
  10271.  
  10272.          Surefire is immediately ready for the creation of a document if you
  10273.     start it from the DOS prompt without any document name. You will see the
  10274.     representation of a standard 8-1/2 by 11 inch page with margins.
  10275.  
  10276.          > SUREFIRE
  10277.  
  10278.          If Surefire is already running, choose "New" from the File menu to
  10279.     clear the current document from the screen but keep the current page
  10280.     formatting and margins. Before this occurs, you will be warned to save
  10281.     the current document, if you haven't already done so.
  10282.  
  10283.          In either case, you are now ready to edit the new, as-yet-unnamed,
  10284.     document. That is, you may immediately enter text, graphics, do text
  10285.     operations, create fields, etc. Later, you can save the new document and
  10286.     give it a name. The chapters on word processing (4 through 9) walk you
  10287.     through all of the steps of creating and editing your document.
  10288.  
  10289.  
  10290.     Protecting Documents
  10291.  
  10292.          Surefire protects your documents and data in a variety of ways. The
  10293.     lack of highlighting for inactive menu items keeps you from selecting
  10294.     inappropriate actions. When menu items are inactive, they cannot be
  10295.     selected. For example, the "Use Document" choice on the Operate menu is
  10296.     not available when there are no fields. Notice that the 'U' is not
  10297.     highlighted.
  10298.  
  10299.          Whenever possible, Surefire warns you through message windows of
  10300.     operations that may affect the integrity of a document.  Surefire will
  10301.     warn you of any side effects before it continues with the action.
  10302.     Throughout this manual are many instances of the actual message windows
  10303.     that are displayed in these cases.
  10304.  
  10305.          Note:   You are also encouraged to routinely make backups of your
  10306.     documents to prevent loss in case of hardware failure or inadvertent
  10307.     editing operations. See the next chapter for information regarding
  10308.     backup procedures.
  10309.  
  10310.  
  10311.     Specifying Document Help
  10312.  
  10313.          If you are going to be creating smart document applications, you
  10314.     might be interested in having document help available for your
  10315.     application. Document help is context  help that can be specified for
  10316.     your own documents. You have already seen how Surefire system help is
  10317.     always available by pressing (F1). The help is different depending on
  10318.     the part of Surefire being displayed at the time. In a similar way, a
  10319.     context in your document changes when topics or areas of your document
  10320.     or application change. You specify the appropriate changes in context
  10321.     within your Smart Document application with the @HELP function.
  10322.  
  10323.  
  10324.  
  10325.                           Copyright (c) 1993 Piaf, Inc.
  10326.  
  10327.     Surefire S2.0 User's Guide                                       Page 176
  10328.  
  10329.          Once specified, document help may be displayed by using the
  10330.     function key (F2). You use Surefire itself to write the text that will
  10331.     be displayed in the help window. Each context of your help is on a
  10332.     separate page of this help document. Generally, you use the @HELP
  10333.     function in the field command for a button or immediate execution field
  10334.     to specify each context change. As your user moves throughout your
  10335.     document switching between pages or other documents, the help context
  10336.     can change.
  10337.  
  10338.          There is one help file per document application. This means that
  10339.     when you initially run Surefire with a document specified at the DOS
  10340.     command prompt, or you explicitly read a document using the Get File
  10341.     window, Surefire will set the current document's help file to the one
  10342.     associated with this document, if there is one. The association comes
  10343.     from the help file  having the same name as the document. For example,
  10344.     if your document were named "accounts", the associated help file would
  10345.     be "accounts.hlp".
  10346.  
  10347.          Note:   As long as you display other documents by pressing buttons
  10348.     that execute @GODOC or @JOIN functions, or you return to a previous
  10349.     document by pressing (Esc), this help file and any previous help
  10350.     contexts will be preserved.  If you exit from Surefire, or explicitly
  10351.     read a document using the Get File window or you choose New from the
  10352.     File menu, Surefire will forget any help context information associated
  10353.     with the previous document. Surefire will change the help file to be the
  10354.     one associated with this new document, if any.
  10355.  
  10356.        Help File Format
  10357.  
  10358.          A help file is merely a Surefire document with a specific name and
  10359.     format.  A template for help files is provided and is called
  10360.     "document.hlp". This file is located in the Surefire installation
  10361.     directory.  All help documents must follow the formatting rules shown
  10362.     below.
  10363.  
  10364.          Rules for Surefire Help Files
  10365.  
  10366.          1) The file name must be the same name as the document but with a
  10367.          ".hlp" extension.
  10368.          2) There must be exactly 66 lines per page.
  10369.          3) There must be exactly 70 characters within the margins.
  10370.          4) There may be no header or footer.
  10371.          5) Both left and right margins should be .5 inches.
  10372.          6) The font must be 10 cpi.
  10373.          7) All pages must have STOP's.
  10374.  
  10375.          The first page of the help file will never appear in the Help
  10376.     window.  This page is used for notes describing the particular help
  10377.     file.  Usually, it is used to summarize the meaning of each context used
  10378.     in this help file. You write the text for the help window in the help
  10379.     file on the page corresponding to the context with which it is to be
  10380.     associated. The context is a number that you specify by using the @HELP
  10381.     function.
  10382.  
  10383.  
  10384.                           Copyright (c) 1993 Piaf, Inc.
  10385.  
  10386.     Surefire S2.0 User's Guide                                       Page 177
  10387.  
  10388.          You may not care about a context if you simply want to specify some
  10389.     overall information about a document.  You can essentially ignore using
  10390.     a context by writing whatever text you want on page 2 of the help file.
  10391.     Whenever (F2) is pressed, the contents of this page will be shown in the
  10392.     Help window.
  10393.  
  10394.        Specifying a Document Help Context
  10395.  
  10396.          The document help context is specified by using the function
  10397.     "@HELP(context)"  where "context" is the number of the page in the
  10398.     document help file to be displayed in the Document Help window when (F2)
  10399.     is pressed.  For normal contexts, the context number must be 2 or
  10400.     greater and is always initially set to 2.
  10401.  
  10402.          For example, if your document were "accounts" and one area was
  10403.     payroll and another was ledger, you can have the help text for payroll
  10404.     be at page 3 of the help file (@HELP(3)) and the help text for ledger be
  10405.     at page 4 of the help file (@HELP(4)). The help file is "accounts.hlp"
  10406.  
  10407.          It is often the case that @HELP is used in conjunction with the
  10408.     @GODOC function since displaying another document is a natural change in
  10409.     context.  When the @HELP function specifies a new context after the
  10410.     @GODOC in the same field command, it changes the context for the next
  10411.     document. The previous context will be restored to what it was set to
  10412.     just before the @GODOC, when you return back to that document by
  10413.     pressing (Esc).
  10414.  
  10415.          Use @HELP(1) when you want to say that a part of your document
  10416.     application will use a new help file. The name of this file is
  10417.     constructed from the name of the current document. Use this method for
  10418.     breaking up the help file of large Smart Document applications or
  10419.     applications that may be run either independently or as part of another
  10420.     application.
  10421.  
  10422.  
  10423.     Using Wild Cards in the Directory Listing
  10424.  
  10425.           In the Get, Save, Delete and Rename windows, pressing (ALT+Z) in the
  10426.     file name field will display all files of the current type (e.g. Document or
  10427.     Text) in the current directory in a pop-list. You may use the wild card
  10428.     character '*' to make this listing more specific. For example, a file name
  10429.     of AL* will show files starting with AL. If there were a document for each
  10430.     of the United States, this directory listing would only show the
  10431.     documents ALASKA and ALABAMA. If you enter a full or partial path name such
  10432.     as C:\surefire\mydir\m*, you will see all files of the current type
  10433.     beginning with "m" in that directory.
  10434.  
  10435.     Note: older versions of Surefire always showed all the documents in the
  10436.     directory listing when using (ALT+Z) . This will still occur unless an '*'
  10437.     is found within the file name.
  10438.  
  10439.  
  10440.  
  10441.  
  10442.  
  10443.                           Copyright (c) 1993 Piaf, Inc.
  10444.  
  10445.     Surefire S2.0 User's Guide                                       Page 178
  10446.  
  10447.     Changing the Drive and Directory from DOS
  10448.  
  10449.          You may run Surefire from DOS with the path name of a document or
  10450.     text file as an argument. If that document is in a different drive and/or
  10451.     directory, that path will become your current drive/directory for your
  10452.     Surefire session. This is helpful since you won't need to set a new path
  10453.     using the Setup window explicitly.
  10454.  
  10455.          For example,   > SUREFIRE B:\DOCUMENT\WORKFILE
  10456.  
  10457.     will start Surefire with the document WORKFILE and set the current drive to
  10458.     B: and the current directory to \DOCUMENT. This will make it easier to Get
  10459.     other files from the same drive and directory as WORKFILE since you will not
  10460.     need to use the Setup window.
  10461.  
  10462.  
  10463.  
  10464.  
  10465.  
  10466.  
  10467.  
  10468.  
  10469.  
  10470.  
  10471.  
  10472.  
  10473.  
  10474.  
  10475.  
  10476.  
  10477.  
  10478.  
  10479.  
  10480.  
  10481.  
  10482.  
  10483.  
  10484.  
  10485.  
  10486.  
  10487.  
  10488.  
  10489.  
  10490.  
  10491.  
  10492.  
  10493.  
  10494.  
  10495.  
  10496.  
  10497.  
  10498.  
  10499.  
  10500.  
  10501.  
  10502.                           Copyright (c) 1993 Piaf, Inc.
  10503.  
  10504.     Surefire S2.0 User's Guide                                       Page 179
  10505.  
  10506.     Chapter 25     -    Surefire System Topics
  10507.  
  10508.          Well, you have reached the end of the Surefire User's Guide. The
  10509.     other chapters of this guide have covered all that you need to know in
  10510.     your day to day usage of Surefire. This chapter covers information that
  10511.     you will probably not refer to very often. These topics include the
  10512.     backing up and recovery of your files, more about how Surefire files
  10513.     appear to DOS and some limits you may encounter in using Surefire.
  10514.  
  10515.     Backing Up Your Files
  10516.  
  10517.          There are two aspects to backing up files in Surefire. One protects
  10518.     you from accidently deleting or saving files when you really didn't want
  10519.     to. The other protects you from unexpected hardware or system errors
  10520.     resulting in catastrophic effects to some or all of your files. You
  10521.     should use the appropriate method at the proper times to protect your
  10522.     investment in time when using your computer.
  10523.  
  10524.        Manual Backups
  10525.  
  10526.          You should always make backup copies of your important Surefire
  10527.     documents and their associated files in case of a catastrophic machine
  10528.     failure. Time and time again these types of failures happen when you
  10529.     have been using your computer intensely for days at a time. You are
  10530.     heavily involved in your work and backing up your files just takes too
  10531.     much time. Don't fall into this trap!
  10532.  
  10533.          Make sure all of the files in your working directory are copied or
  10534.     backed up to a floppy disk or tape unit periodically. Every once in a
  10535.     while say to yourself "If my computer failed totally and I lost all my
  10536.     data how much time will it take to do every thing over again?" If you
  10537.     can't afford this scenario, do a backup! You can backup your files by
  10538.     using the DOS command cd to get to your working directory and then using
  10539.     copy or backup. Refer to your DOS manual for more information about
  10540.     these commands.
  10541.  
  10542.        Automatic File Backup and Recovery
  10543.  
  10544.          If you have chosen the auto backup option from the Setup window,
  10545.     documents modified during a Surefire session will be backed up, in the
  10546.     current directory, automatically. See the section "System Setup" in
  10547.     "Chapter 2: Getting Started" for details on setting this option.
  10548.  
  10549.          Whenever you save a document, Surefire will set aside the previous
  10550.     version of that document if one exists.  Surefire makes copies of each
  10551.     of the files associated with the document. With Auto Backup, if you
  10552.     somehow save a document incorrectly, for example, by using the name of
  10553.     an existing document and thus un-intentionally overwriting a document,
  10554.     you can recover the "lost" document. This will also be handy if you
  10555.     inadvertently delete a document.
  10556.  
  10557.          Note:   Whether or not you use this option, Surefire will always
  10558.     backup a database when a base document is deleted and during a database
  10559.     restructuring operation.
  10560.  
  10561.                           Copyright (c) 1993 Piaf, Inc.
  10562.  
  10563.     Surefire S2.0 User's Guide                                       Page 180
  10564.  
  10565.          Having files backed-up in this way means that you can recover the
  10566.     previous version of your document. This previous version will have an
  10567.     exclamation '!' character followed by the usual 2 characters of the file
  10568.     extension. If you don't want the changes that you just saved to disk by
  10569.     saving your document via the Save File window you can exit Surefire and
  10570.     restore your original document. From DOS, you use the copy command to
  10571.     restore the changed document to its previous version. You also use the
  10572.     del command to remove all of the index files. Surefire will
  10573.     automatically create new ones when needed.
  10574.          To recover a backed up document, such as CLIENT, enter the
  10575.     following DOS commands at the DOS prompt:
  10576.  
  10577.          >COPY CLIENT.!OC  CLIENT.DOC
  10578.          >COPY CLIENT.!LD  CLIENT.FLD
  10579.          >COPY CLIENT.!BF  CLIENT.DBF
  10580.          >DEL CLIENT.ND*
  10581.  
  10582.          Note:   If you are short of disk space you may not have enough room
  10583.     for the auto backed up copies. You can turn auto backup off and then
  10584.     delete some of your backup files to free up disk space. If you do, we
  10585.     recommend that you first do a manual backup (see the previous section).
  10586.  
  10587.  
  10588.     Surefire Files
  10589.  
  10590.          Surefire documents are really composed of a group of files that
  10591.     contain the various information needed to present the text, fields and
  10592.     data of the documents. Other files support the available printers, data
  10593.     import and export operations, on-line help and database indexing for
  10594.     quick data access. You may see various files when you look at the DOS
  10595.     directories where you use Surefire. The following table lists the types
  10596.     of files you may see and what their three character DOS extensions are.
  10597.     The asterisk (*) shows that the file name can be anything.
  10598.  
  10599.          File Type                     File Name or Extension
  10600.  
  10601.          Document file (text portion)  *.DOC
  10602.          Field file                    *.FLD
  10603.          Database file                 *.DBF
  10604.          Index file                    *.NDn
  10605.          ASCII text file               *.TXT
  10606.          Export/Import data file       *.DTA
  10607.          Printer definitions           *.PD
  10608.          Help files                    *.HLP
  10609.          Surefire Program              SUREFIRE.EXE
  10610.          Configuration File            SUREFIRE.CFG
  10611.  
  10612.  
  10613.  
  10614.  
  10615.  
  10616.  
  10617.  
  10618.  
  10619.  
  10620.                           Copyright (c) 1993 Piaf, Inc.
  10621.  
  10622.     Surefire S2.0 User's Guide                                       Page 181
  10623.  
  10624.        Document File Format - WordStar Compatible
  10625.  
  10626.          The file structure used for all document files, which are files
  10627.     with the extension ".doc" are compatible with WordStar 5 and earlier
  10628.     versions.  What this means is that Surefire .doc files can be read
  10629.     directly into WordStar without any conversion. Likewise,WordStar
  10630.     documents can be read directly into Surefire as a Document. Any
  10631.     attributes or formatting that can be specified in WordStar that are not
  10632.     available in Surefire will be ignored by Surefire.
  10633.  
  10634.          Surefire's specifications for formatting and attributes are very
  10635.     straight-forward. WordStar was chosen because many other word processors
  10636.     and editors can convert to and from WordStar format, and thus to and
  10637.     from Surefire. Using this format, the simple formatting and attributes
  10638.     supported by Surefire won't be lost when transferred to other systems.
  10639.  
  10640.        Database File Format - DBase III Compatible
  10641.  
  10642.          The file structure for all database files, ".dbf" and ".nd?", are
  10643.     Dbase III compatible.  This means that these files can be directly
  10644.     accessed by Dbase III or any other software that works with Dbase III
  10645.     files, including Dbase IV.
  10646.  
  10647.          Surefire can also access Dbase files created by these other
  10648.     programs, provided that document fields are defined to be consistent
  10649.     with the database definitions. To use these .dbf files directly, the
  10650.     document fields must be the same type, size and with cell names
  10651.     specified to correspond to those in the database definition.  Databases
  10652.     defined by Dbase III must have field names with at least three
  10653.     characters. All characters of these field names must be alphabetic. We
  10654.     recommend that any index files from Dbase III are not used, since
  10655.     Surefire will automatically create them as needed.
  10656.  
  10657.        Locking Documents
  10658.  
  10659.          Sometimes you may have a set of Smart documents that you and
  10660.     perhaps others will use on a regular basis to do your work. It is often
  10661.     desirable to set up these documents so that they cannot be altered. You
  10662.     can lock documents by using the DOS command attrib to set the document
  10663.     files (eg. files with the extension .DOC) to be read-only.  This will
  10664.     prevent Surefire from saving any files associated with the document.
  10665.     See your DOS manual for more information about the attrib command.
  10666.  
  10667.  
  10668.  
  10669.  
  10670.  
  10671.  
  10672.  
  10673.  
  10674.  
  10675.  
  10676.  
  10677.  
  10678.  
  10679.                           Copyright (c) 1993 Piaf, Inc.
  10680.  
  10681.     Surefire S2.0 User's Guide                                       Page 182
  10682.  
  10683.     System Constraints
  10684.  
  10685.          We all wish that there were no limits in the machines or programs
  10686.     that we use.  We recognize, however, that nothing can work efficiently
  10687.     if everything was done to the furthest extent. For this reason we will
  10688.     discuss some of the limits that you may encounter while using Surefire.
  10689.     The tables below summarize Surefire System limits.
  10690.  
  10691.         There is room for approximately 15 to 20 standard 8-1/2 by 11 inch
  10692.     pages in 640K RAM. When documents approach this limit, we recommend that
  10693.     your document is broken down into more than one document. This can be
  10694.     done by deleting the second portion of the document and saving the
  10695.     document with a different name such as "mydoc2". Then get the original
  10696.     document, delete the first portion and save this document with a
  10697.     descriptive name such as "mydoc1". You can then delete the original
  10698.     document so as not to be confused.
  10699.  
  10700.          You will be warned with a message window if you are about to run
  10701.     out of memory. Since memory is generally left fragmented, it is best to
  10702.     save your document, exit Surefire and then re-run Surefire.
  10703.  
  10704.          Word Processor Limits
  10705.  
  10706.          Maximum page width: 260 characters
  10707.          Maximum page length: 96 lines
  10708.          Minimum page width: 10 characters
  10709.          Minimum page length: 3 lines
  10710.          Minimum space between left and right margins: 10 characters
  10711.          Minimum space between top and bottom margins: 3 lines
  10712.          Maximum number of pages per document: 250 but normally limited by
  10713.          memory (varies by page size)
  10714.          Maximum number of clipboard objects: 20
  10715.  
  10716.          Field Limits
  10717.  
  10718.          Maximum number of fields per document: 500
  10719.          Total number of non-stored fields in a document: limited only by
  10720.          memory
  10721.          Maximum size of a text field (non-stored): size of the page
  10722.          Maximum size of a text field (stored): 254 characters
  10723.          Maximum width of numeric field: 16 characters (without '%','$',',')
  10724.          Maximum number of cells in multiline numeric field: limited by page
  10725.          length (96)
  10726.          Maximum number of items in a text field pop-list: 30
  10727.  
  10728.          Database Limits
  10729.  
  10730.          Database file size is limited only by the size of your disk
  10731.          Total number of stored or projected fields per document: 128
  10732.          Maximum number of records is 1 billion (limited by disk)
  10733.          Maximum record size: 4,000 bytes
  10734.          Maximum size of a stored text field is 254 characters
  10735.          Maximum number of named queries: 20 per document
  10736.          While Dbase III file compatible, Surefire does not use memo fields
  10737.  
  10738.                           Copyright (c) 1993 Piaf, Inc.
  10739.  
  10740.     Surefire S2.0 User's Guide                                       Page 183
  10741.  
  10742.     Internationalization Features
  10743.  
  10744.          Surefire supports basic internationalization features primarily to
  10745.     support use of Surefire in English speaking
  10746.     countries. This section summarizes these features.
  10747.  
  10748.     In the Setup Window
  10749.  
  10750.          There are 3 fields in the Setup Window that pertain to
  10751.     internationalization:
  10752.  
  10753.          Metric   - Allows you to set whether Surefire displays dimensions in
  10754.     centimeters or inches in the Format Window.
  10755.     Press (Spacebar) to indicate Yes or No.
  10756.  
  10757.          Page Size- Set the default page size for Surefire
  10758.     documents. The default page size is the page size used when Surefire is
  10759.     first run and no document name is given on the command line. In general this
  10760.     is used with the SAVE button. When you select the default page size, this
  10761.     does not change the size of the current document. You must do a RESET and OK
  10762.     from the Format window to do this. The various page sizes that can be
  10763.     specified as a default are the same as those that you can
  10764.     specify in the Format window.
  10765.  
  10766.          Currency - The currency symbol may be set to either $ or British pound
  10767.     ( ). This symbol appears in numeric fields created with the Currency
  10768.     attribute. For other currencies that are designated with letters such as FF
  10769.     for French Francs, type the designator outside the field and use a Decimal
  10770.     numeric field.
  10771.  
  10772.     In the Format Window
  10773.  
  10774.          Various pages sizes are available including 8 1/2 inches by 11 inches,
  10775.     8 1/2 inches by 14 inches and A4 for outside of North America.
  10776.  
  10777.     Using International Keyboards
  10778.  
  10779.          Surefire accepts input from keyboards that are supported by the DOS
  10780.     keyb command. All text is processed and displayed in your language of
  10781.     choice. There is no provision however to do database sorting according to
  10782.     languages other than English.
  10783.  
  10784.     Date Formats
  10785.  
  10786.          Surefire supports 6 date formats that are available for date fields.
  10787.     These formats are shown below.
  10788.  
  10789.          mm/dd/yy
  10790.          dd-mmm-yy
  10791.          Month dd, yyyy
  10792.          dd/mm/yy
  10793.          dd-mm-yy
  10794.          yy-mm-dd
  10795.  
  10796.  
  10797.                           Copyright (c) 1993 Piaf, Inc.
  10798.  
  10799.     Surefire S2.0 User's Guide                                       Page 184
  10800.  
  10801.     Appendix A     -    Surefire Function Reference
  10802.  
  10803.          Field commands can be simple or complex. They can manipulate
  10804.     various types of information including numbers, dates and text. They can
  10805.     also control database access and link documents together. This chapter
  10806.     describes all of the functions that are available in Surefire that you
  10807.     may use in field commands. The various aspects of field commands are
  10808.     described in "Chapter 14: Introducing Field Commands" and in "Chapter
  10809.     15: Using Field Commands".
  10810.  
  10811.  
  10812.     General Mathematical Functions
  10813.  
  10814.          These functions do the most general mathematical manipulations. Any
  10815.     of these functions can be used in the Calculator.
  10816.  
  10817.     Absolute Value
  10818.  
  10819.          @ABS(n) - Return the absolute value of n.
  10820.  
  10821.          Example:       @ABS(-15) returns 15
  10822.  
  10823.     Integer Value
  10824.  
  10825.          @INT(n) - Truncate the decimal part of n and return the integer
  10826.          value.
  10827.  
  10828.          Example:       @INT(11.55) returns 11.
  10829.  
  10830.     Remainder
  10831.  
  10832.          @MOD(dividend, divisor) - Return the integer that represents the
  10833.          amount left over when the dividend is divided by divisor.
  10834.  
  10835.          Example:       @MOD(27, 5) returns 2.
  10836.  
  10837.     Rounding
  10838.  
  10839.          @ROUND(n, place) - Round n to the nearest value with the number of
  10840.          decimal places defined by place.
  10841.  
  10842.          Example:       @ROUND(77.456, 2) returns 77.46.
  10843.  
  10844.     Square Root
  10845.          @SQRT(n) - Return the square root of n.
  10846.  
  10847.          Example:       @SQRT(64) returns 8.
  10848.  
  10849.  
  10850.  
  10851.  
  10852.  
  10853.  
  10854.  
  10855.  
  10856.                           Copyright (c) 1993 Piaf, Inc.
  10857.  
  10858.     Surefire S2.0 User's Guide                                       Page 185
  10859.  
  10860.     Trigonometric Functions
  10861.  
  10862.          These are the basic trigonometric functions. Any of these functions
  10863.     can be used in the Calculator.
  10864.  
  10865.     Pi
  10866.  
  10867.          @PI - Return the value of Pi.
  10868.  
  10869.          Pi is specified as 3.141592653589794.
  10870.  
  10871.     Sine
  10872.  
  10873.          @SIN(n) - Return the sine of n, where n is an angle in radians.
  10874.  
  10875.     Cosine
  10876.  
  10877.          @COS(n) - Return the cosine of n, where n is an angle in radians.
  10878.  
  10879.     Tangent
  10880.  
  10881.          @TAN(n) - Return the tangent of n, where n is an angle in radians.
  10882.  
  10883.  
  10884.     Logarithmic Functions
  10885.  
  10886.          These are the logarithmic functions. Any of these functions can be
  10887.     used in the Calculator.
  10888.  
  10889.     Logarithm
  10890.  
  10891.          @LOG(n) -  Return the logarithm (base 10) of the positive number n.
  10892.  
  10893.          Example:       @LOG(300) returns 2.4771212547.
  10894.  
  10895.     Power of e
  10896.  
  10897.          @EXP(n) - Return the value of "e" raised to the power of n.
  10898.          Example:       @EXP(6) returns 403.42879349.
  10899.  
  10900.     Natural Logarithm
  10901.  
  10902.          @LN(n) Return the natural logarithm (base "e") of n.
  10903.  
  10904.          Example:       @LN(100) returns 4.605170186.
  10905.  
  10906.  
  10907.  
  10908.  
  10909.  
  10910.  
  10911.  
  10912.  
  10913.  
  10914.  
  10915.                           Copyright (c) 1993 Piaf, Inc.
  10916.  
  10917.     Surefire S2.0 User's Guide                                       Page 186
  10918.  
  10919.     Financial Functions
  10920.  
  10921.          The following are available functions to do financial calculations.
  10922.     Any of these functions can be used in the Calculator.
  10923.  
  10924.     Future Value
  10925.  
  10926.          @FV(pmt, int, term) - Return the future value of an investment
  10927.          given the payment, pmt, the periodic interest rate, int, and the
  10928.          term of the loan, term.
  10929.  
  10930.     Payment Amounts
  10931.  
  10932.          @PMT(prin, int, term) - Return the payment of a loan given the
  10933.          principle, prin, the periodic interest rate, int, and the term of
  10934.          the loan, term.
  10935.  
  10936.     Present Value
  10937.  
  10938.          @PV(pmt, int, term) - Return the present value of an investment
  10939.          given the payment, pmt, the periodic interest rate, int, and the
  10940.          term of the loan, term.
  10941.  
  10942.     Compound Growth Rate
  10943.  
  10944.          @RATE(fv, pv, term) - Return the compound growth rate given the
  10945.          future value, fv, the present value, pv, and the term of the loan,
  10946.          term.
  10947.  
  10948.     Statistical Functions
  10949.  
  10950.          Statistical functions are a class of numeric functions that operate
  10951.     on a group of numbers. Generally, the group of numbers is specified as
  10952.     one or more cell ranges or field references separated by commas. For
  10953.     example, the group (A1:B2, C)  is made of all the cells in the range of
  10954.     A1 through B2 and the field C. This group of cells can not span pages.
  10955.  
  10956.          For the examples given with these functions, let's use the fields
  10957.     and cells shown below:
  10958.  
  10959.     Average
  10960.  
  10961.          @AVG(references) - Return the average of all the numbers found in
  10962.          the cells specified by references.
  10963.  
  10964.          Example:       @AVG(A1:B2) returns 15
  10965.  
  10966.     Count
  10967.  
  10968.          @COUNT(references) - Return the count of all cells specified by
  10969.          references.
  10970.  
  10971.          Examples:      @COUNT(A) returns 2.
  10972.                         @COUNT(A1:B2, C) returns 5.
  10973.  
  10974.                           Copyright (c) 1993 Piaf, Inc.
  10975.  
  10976.     Surefire S2.0 User's Guide                                       Page 187
  10977.  
  10978.     Maximum
  10979.  
  10980.          @MAX(references) - Return the maximum of all the numbers found in
  10981.          the cells specified by references.
  10982.  
  10983.          Examples:      @MAX(A1:B2) returns 30.
  10984.                         @MAX(A1:B2, D) returns 62.
  10985.  
  10986.     Minimum
  10987.  
  10988.          @MIN(references) - Return the minimum of all the numbers found in
  10989.          the cells specified by references.
  10990.  
  10991.          Examples:      @MIN(A1:B2) returns 5.
  10992.                         @MIN(C, D) returns 20.
  10993.  
  10994.     Sum
  10995.  
  10996.          @SUM(references) - Return the sum of all the numbers found in the
  10997.          cells specified by references.
  10998.  
  10999.          Examples:      @SUM(A1:B2) returns 60.
  11000.                         @SUM(A, C, D) returns 107.
  11001.  
  11002.          The next two functions operate on a single range of cells or a
  11003.     single field reference. In addition, their results will be affected by
  11004.     the current execution order for the page on which the cells are found.
  11005.     A vertical order will give a different result than a horizontal order.
  11006.     See "Chapter 16: Spreadsheets" for information on how to set the
  11007.     execution order.
  11008.  
  11009.     Standard Deviation
  11010.  
  11011.          @STD(cell1:cell2) or @STD(field) - Return the standard deviation of
  11012.          all the numbers contained in cell1:cell2 or in all cells of field.
  11013.  
  11014.          Example:       @STD(A1:B2) returns 9.
  11015.  
  11016.     Variance
  11017.  
  11018.          @VAR(cell1:cell2) or @VAR(field) - Return the variance of all
  11019.          numbers contained in cell1:cell2 or in all cells of field.
  11020.  
  11021.          Example:       @VAR(A1:B2) returns 88.
  11022.  
  11023.     Date Functions
  11024.  
  11025.          A date function either produces a date as a result or requires a
  11026.     date value or a reference to a date field in at least one argument. When
  11027.     a date value results from a function, it may be displayed in a date
  11028.     field in one of three formats. The following are the date functions
  11029.     available in Surefire.  The arguments date, date1 and date2  in these
  11030.     functions represent date field references or date values resulting from
  11031.     any of the functions that return dates, such as @TODAY, @SUBDAYS, etc.
  11032.  
  11033.                           Copyright (c) 1993 Piaf, Inc.
  11034.  
  11035.     Surefire S2.0 User's Guide                                       Page 188
  11036.  
  11037.     Add Days to a Date
  11038.  
  11039.          @ADDDAYS(date,days) - Returns the date that is days number of days
  11040.          after date.
  11041.  
  11042.          Example:  Date field testdate has the value 5/7/90;
  11043.                    @ADDDAYS(testdate, 15) returns 5/22/90.
  11044.  
  11045.     Date is After?
  11046.  
  11047.          @AFTER(date1,date2) - Return the logical value TRUE if date1 is
  11048.          after date2, otherwise return FALSE.
  11049.  
  11050.          Example:  Date field testdate1 has value 3/21/85; testdate2 has
  11051.                    4/20/85.
  11052.                    @AFTER( testdate1, testdate2 ) returns FALSE.
  11053.  
  11054.     Date is Before?
  11055.          @BEFORE(date1,date2) - Return the logical value TRUE if date1 is
  11056.          earlier than date2, otherwise return FALSE
  11057.  
  11058.          Example:  Date field testdate1 has value 3/21/85; testdate2 has
  11059.                    4/20/85.
  11060.                    @BEFORE( testdate1, testdate2 ) returns TRUE.
  11061.  
  11062.     Specify a Date
  11063.  
  11064.          @DATE(month,day,year) - Returns a date corresponding to the integer
  11065.          numbers representing month, day and year. Year must be either 2 or
  11066.          4 digits.
  11067.  
  11068.          Example:  @DATE(8, 6, 54) returns 8/6/54
  11069.                    (or August 6, 1954 or aug-06-54).
  11070.  
  11071.     Day of Month
  11072.  
  11073.          @DAY(date) - Returns an integer number corresponding to the day
  11074.          specified in date.
  11075.  
  11076.          Example:  Date field testdate1 has value 5/12/34;
  11077.                    @DAY(testdate1) returns 12.
  11078.  
  11079.     Find Days between Dates
  11080.  
  11081.          @DIFDATE(date1,date2) - Return an integer that is the number of
  11082.          days between date1 and date2.
  11083.  
  11084.          Example:  Date field testdate1 has value January 5, 1987; Date
  11085.                    field testdate2 has value December 19, 1986.
  11086.                    @DIFDATE(testdate1, testdate2) returns 17 (days).
  11087.  
  11088.  
  11089.  
  11090.  
  11091.  
  11092.                           Copyright (c) 1993 Piaf, Inc.
  11093.  
  11094.     Surefire S2.0 User's Guide                                       Page 189
  11095.  
  11096.     Month of Year
  11097.  
  11098.          @MONTH(date) - Returns an integer number corresponding to the month
  11099.          specified in date.
  11100.  
  11101.          Example:       Date field testdate1 has value 3/21/85;
  11102.                         @MONTH(testdate1) returns 3 (month is March)
  11103.  
  11104.     Dates are Same?
  11105.  
  11106.          @SAME(date1, date2) - Return the logical value TRUE if date1 and
  11107.          date2 are the same, otherwise return FALSE.
  11108.          Example:       Date field testdate1 has value 3/21/85; testdate2
  11109.                         has 10/14/78.
  11110.                         @SAME(testdate1, testdate2) returns FALSE.
  11111.  
  11112.     Subtract Days from a Date
  11113.  
  11114.          @SUBDAYS(date, days) - Returns the date that is days number of days
  11115.          before date.
  11116.  
  11117.          Example:  Date field testdate has value 13-mar-55.
  11118.                    @SUBDAYS(testdate, 5) returns 08-mar-55
  11119.                    (or March 8, 1955 or 8/8/55).
  11120.  
  11121.     Today's Date
  11122.  
  11123.          @TODAY - Return today's date as a date.
  11124.  
  11125.          Example:  Today is New Year's Day 1995.
  11126.                    @TODAY returns 1/1/95
  11127.                    (or 1-jan-95 or January 1, 1995).
  11128.  
  11129.     Year
  11130.  
  11131.          @YEAR(date) - Return an integer number corresponding to the year
  11132.          specified in date.
  11133.  
  11134.          Example:  Date field testdate has value 3/21/85;
  11135.                    @YEAR( testdate ) returns 1985.
  11136.  
  11137.     Text of a Date
  11138.  
  11139.          @DATESTR(date) - Return a text string that represents date. This
  11140.          string can be assigned to a text field or written on a page of the
  11141.          document.
  11142.  
  11143.          Example:  Date field testdate has value March 9, 1977;
  11144.                    @DATESTR(testdate) returns "March 9, 1977"
  11145.  
  11146.  
  11147.  
  11148.  
  11149.  
  11150.  
  11151.                           Copyright (c) 1993 Piaf, Inc.
  11152.  
  11153.     Surefire S2.0 User's Guide                                       Page 190
  11154.  
  11155.     Text of a Month
  11156.  
  11157.          @MONTHSTR(m) - Convert a number m to the string of the
  11158.          corresponding month. A number greater than 12 will produce the
  11159.          month based on modulo 12. This string can be assigned to a text
  11160.          field or written on a page of the document.
  11161.          Examples: @MONTHSTR(6) returns "June".
  11162.                    @MONTHSTR(15) returns "March".
  11163.  
  11164.     Text of a Day
  11165.  
  11166.          @DAYSTR(date) - Return the day of the week as a string based on the
  11167.          given date.  This string can be assigned to a text field or written
  11168.          on a page of the document.
  11169.  
  11170.          Example:  Date field testdate has value August 10, 1990.
  11171.                    @DAYSTR( testdate ) returns "Friday".
  11172.  
  11173.     Text Functions
  11174.  
  11175.          A text function is defined as a function in which the result or at
  11176.     least one of its arguments requires a text string or reference to a text
  11177.     field.  In fact, there are some text strings that yield numeric results.
  11178.     These numeric results can be used in mathematical expressions. Also, if
  11179.     a text function requires a number as an argument, this argument can be
  11180.     any numeric function or mathematical expression.
  11181.  
  11182.          The arguments text or str may be quoted strings or references to
  11183.     text fields.  The argument start may be a number of 0 or greater where
  11184.     0 means the first character of the string.
  11185.  
  11186.     Find a String
  11187.  
  11188.          @FIND(str, text, start) - Find string str within text beginning at
  11189.          position start. Return the integer number corresponding to the
  11190.          position in text of where the string was found.  If the string is
  11191.          not found, -1 is returned.
  11192.  
  11193.          Example:       @FIND("most", "foremost", 0) returns 4.
  11194.  
  11195.     Obtain a String
  11196.  
  11197.          @SUBSTR(text, start, len) - Return a text string within text
  11198.          beginning at the position start whose length is len.
  11199.  
  11200.          Example:       @SUBSTR("activity", 2, 3) returns "tiv".
  11201.  
  11202.  
  11203.  
  11204.  
  11205.  
  11206.  
  11207.  
  11208.  
  11209.  
  11210.                           Copyright (c) 1993 Piaf, Inc.
  11211.  
  11212.     Surefire S2.0 User's Guide                                       Page 191
  11213.  
  11214.     Replace a String
  11215.  
  11216.          @REPLACE(text, start, len, str) - Return the text string after
  11217.          replacing the number of characters len beginning at position start
  11218.          in text with another string str.
  11219.  
  11220.          Example:       @REPLACE( "generate", 0,3, "coop") returns
  11221.                         "cooperate".
  11222.  
  11223.     Obtain Length of String
  11224.  
  11225.          @LENGTH(text) - Return the number of characters in the text string
  11226.          text.
  11227.  
  11228.          Example:  Text field text1 has the value "ghost".
  11229.                    @LENGTH(text1) returns 5.
  11230.  
  11231.     Remove Trailing Blanks
  11232.  
  11233.          @TRIM(text) - Remove any blank spaces at the end of text.
  11234.  
  11235.          Example:       @TRIM("people in the news       ") returns "people
  11236.                         in the news".
  11237.  
  11238.     Compare Two Strings
  11239.  
  11240.          @EXACT(text1, text2) - Return the logical value TRUE if text1 and
  11241.          text2 are the same, otherwise return FALSE.
  11242.  
  11243.          Example:       @EXACT("mice", "mouse") returns FALSE.
  11244.  
  11245.     Force String to Upper Case
  11246.  
  11247.          @UPPER(text) - Return a text string after changing all the
  11248.          characters of text to upper case.
  11249.  
  11250.          Example:       @UPPER("house") returns "HOUSE".
  11251.  
  11252.     Force String to Lower Case
  11253.  
  11254.          @LOWER(text) - Return a text string after changing all the
  11255.          characters of text to lower case.
  11256.  
  11257.          Example:       @LOWER("MixeD") returns "mixed".
  11258.  
  11259.     Convert a Number to a String
  11260.  
  11261.          @NUMSTR(n) - Return a text string that represents the number n. Use
  11262.          this function to convert numeric field values to text field values.
  11263.          Example:       @NUMSTR(15) returns "15".
  11264.  
  11265.  
  11266.  
  11267.  
  11268.  
  11269.                           Copyright (c) 1993 Piaf, Inc.
  11270.  
  11271.     Surefire S2.0 User's Guide                                       Page 192
  11272.  
  11273.     Put String to a Page
  11274.  
  11275.          @PUTSTR(page, text, col, line) - Put the text string text on page
  11276.          page beginning at column col, and line line.
  11277.  
  11278.          Example:  Text field teststring has the value "This is a Test".
  11279.                    @PUTSTR( 5, teststring, 30, 20) will put the string "This
  11280.                    is a Test" at line 20 and column 30 of page 5 of the
  11281.                    current document.
  11282.  
  11283.     Text Buffer Functions
  11284.  
  11285.          These functions manipulate text in text buffers.  Text buffers are
  11286.     similar to clipboard objects except they are only manipulated by the
  11287.     following functions. They are useful in carrying information between
  11288.     documents. In all of these functions, the number specified by buffer may
  11289.     be between 1 and 25. All of these functions return TRUE if the operation
  11290.     was successful. Otherwise, they return FALSE.
  11291.  
  11292.     Copy Text to Buffer
  11293.  
  11294.          @COPY(page, col1, line1, col2, line2, buffer) - Do a Block
  11295.          selection and Copy the text on the page page from the rectangle
  11296.          whose upper left corner is at col1, line1 and whose lower right
  11297.          corner is at col2, line2 to the buffer buffer.
  11298.  
  11299.          Example:       @COPY(1, 10, 1, 20, 2, 5) will copy the rectangle
  11300.                         from columns 10 through 20 on lines 1 and 2 of page
  11301.                         1 to buffer 5. This is a block of text 11
  11302.                         characters wide and 2 lines high.
  11303.  
  11304.     Paste Buffer onto Page
  11305.  
  11306.          @PASTE(page, col, line, buffer, copyattr) - Paste the text from the
  11307.          buffer buffer that was copied via @COPY or @FCOPY on the page page
  11308.          starting at col, line.  If copyattr is @TRUE, write the attributes
  11309.          that were also copied to the buffer. Otherwise, the text is written
  11310.          using whatever attributes are already there at that place on the
  11311.          page.  The contents of buffer are retained until other information
  11312.          is copied into that buffer.
  11313.  
  11314.          Example:       @PASTE(2, 30, 10, 5, @FALSE) will paste the
  11315.                         contents of buffer 5 at column 30 line 10 of page 2
  11316.                         without changing the attributes at that location.
  11317.  
  11318.     Copy Text from Field to Buffer
  11319.  
  11320.          @FCOPY(field, buffer) or @FCOPY(, buffer) - Same as @COPY except
  11321.          the rectangle is that of field. If field is not specified, the
  11322.          buffer buffer is cleared.
  11323.  
  11324.          Example:  The numeric field digits displays the value $376.30.
  11325.                    @FCOPY(digits, 10) puts "$376.30" into buffer 10.
  11326.  
  11327.  
  11328.                           Copyright (c) 1993 Piaf, Inc.
  11329.  
  11330.     Surefire S2.0 User's Guide                                       Page 193
  11331.  
  11332.     Paste Buffer into Field
  11333.  
  11334.          @FPASTE(field, buffer, copyattr) - Same as @PASTE except the
  11335.          location of the Paste is the upper left corner of field. The value
  11336.          of field is also set.
  11337.  
  11338.          Example:  Birthdate is a long format date field. Buffer 16 contains
  11339.                    "03/09/80".
  11340.                    @FPASTE(birthdate, 16, @FALSE) will display "March 9,
  11341.                    1980" in birthdate.
  11342.  
  11343.     Time Functions
  11344.  
  11345.          While Surefire does not have a field type specifically for time, it
  11346.     is often useful to have values based on time. These functions return
  11347.     text strings based on the current time which can then be assigned to
  11348.     text fields or displayed on a document page.
  11349.  
  11350.     Current Time
  11351.  
  11352.          @TIME - Return a string corresponding to current time in the form
  11353.          hh:mm:ss.
  11354.  
  11355.          Example:   It is now 5:30 AM. @TIME returns "5:30:00".
  11356.  
  11357.     Time Stamp
  11358.  
  11359.          @NOW - Return a string corresponding to the current date and time
  11360.          in the form yymmddhhmmss. This is often useful to generate a unique
  11361.          account number.
  11362.  
  11363.          Example:  It is now 12:52 on May 9, 1990.
  11364.                    @NOW returns "900509125200"
  11365.  
  11366.     Control Functions
  11367.  
  11368.          Control functions perform some immediate action. Because the result
  11369.     is an action, these functions are used with button fields or with the
  11370.     Execute on Enter prefix "[".
  11371.  
  11372.          Control functions generally return a logical value.  If this is a
  11373.     TRUE value, the function was executed as expected.  If a FALSE was
  11374.     returned, there was some sort of problem. A FALSE returned from an
  11375.     @GODOC, @RETURN, or the database control function @JOIN will stop
  11376.     execution of the remaining commands for that button or immediate command
  11377.     string ([) if there are any. Otherwise, Surefire will display "COMMAND
  11378.     ERROR" in the status line but will attempt to continue processing the
  11379.     remainder of the command.
  11380.  
  11381.          The control functions available in Surefire are on the following
  11382.     pages.
  11383.  
  11384.  
  11385.  
  11386.  
  11387.                           Copyright (c) 1993 Piaf, Inc.
  11388.  
  11389.     Surefire S2.0 User's Guide                                       Page 194
  11390.  
  11391.     Go To a Page
  11392.  
  11393.          @GOPAGE(page) - Scroll the document and put the cursor in the first
  11394.          field on the page whose number is page. If there are no fields on
  11395.          that page, put the cursor at the top of the page. Return TRUE if
  11396.          successful, and FALSE if the page does not exist.
  11397.  
  11398.          Example:       @GOPAGE(5) will display page 5 of the current
  11399.                         document.
  11400.  
  11401.     Go To a Field
  11402.  
  11403.          @GOFIELD(field) - Put the cursor in the specified field.  If the
  11404.          field does not exist return FALSE, otherwise return TRUE.
  11405.  
  11406.          Example:  @GOFIELD(account) puts the cursor on the field named
  11407.                    account.
  11408.  
  11409.     Go To a Document
  11410.  
  11411.          @GODOC(name) - Get the document whose name is specified by name.
  11412.          Return FALSE if the document is not found, otherwise return TRUE.
  11413.          You may specify a document in a different directory by giving a
  11414.          relative pathname. If you do this, the current directory will be
  11415.          changed before Surefire looks for and reads the document. The name
  11416.          of the document must be in quotes (").
  11417.  
  11418.          Examples: Currently looking at document news. The directory is
  11419.                    topdir.
  11420.  
  11421.                    1) @GODOC("people") will display the first page of the
  11422.                    document people.
  11423.  
  11424.                    2) @GODOC("newdir\finance") will switch to the directory
  11425.                    newdir and then display the document finance.
  11426.  
  11427.          Advanced Use:  If you have already accessed this document during
  11428.                         this session, Surefire remembers the most recent
  11429.                         database query executed for the document. Use the
  11430.                         prefix (!) to avoid re-execution of the query when
  11431.                         this document is displayed.
  11432.  
  11433.     Return to Previous Document
  11434.  
  11435.          @RETURN - Read the document that executed the @GODOC function that
  11436.          got the current document. Return TRUE if successful, otherwise
  11437.          return FALSE. If @GODOC or @JOIN caused a change in directory, the
  11438.          previous directory will be restored as the current directory.
  11439.  
  11440.          Examples:
  11441.               1) @RETURN from example 1 above redisplays the document news.
  11442.  
  11443.               2) @RETURN from example 2 above will switch to directory
  11444.               topdir and redisplay the document news.
  11445.  
  11446.                           Copyright (c) 1993 Piaf, Inc.
  11447.  
  11448.     Surefire S2.0 User's Guide                                       Page 195
  11449.  
  11450.     Return to Document at Level
  11451.  
  11452.          @RETURN(levels) - Read the document at the specified number of
  11453.          levels above the current document. Return TRUE if successful,
  11454.          otherwise return FALSE. If @GODOC or @JOIN caused a change in
  11455.          directory, the previous current directory will be restored. If
  11456.          levels is 1, this function is the same as the function @RETURN
  11457.          without arguments.
  11458.  
  11459.          Example:  Do @GODOC from document A to document B. Then do
  11460.                    @GODOC from document B to document C.
  11461.  
  11462.                    @RETURN(2) from document C will go back 2 levels and
  11463.                    redisplay document A.
  11464.  
  11465.     Run a DOS Command
  11466.  
  11467.          @RUN(command) - Run the DOS command or program that is specified in
  11468.          the text string command. Command may also be a text field
  11469.          reference. After the command is executed, you will be asked to
  11470.          press a key to return to Surefire.
  11471.  
  11472.          Example:  @RUN("myprogram") will run the executable program named
  11473.                    myprogram.
  11474.  
  11475.          Note:   You can only run a program that fits in memory along with
  11476.          Surefire.
  11477.     Reset the Document
  11478.  
  11479.          @RESET or @RESET(report) - Re-get the current document but don't
  11480.          give any warnings and don't clear the current query information. If
  11481.          report is @TRUE, pre-specified report formatting is enabled while
  11482.          @FALSE disables any report generation.
  11483.  
  11484.          This first version of the function is used to return the fields to
  11485.     a document with report formatting so that you can Search & Print the
  11486.     report or generate a different report by changing the query. The second
  11487.     version allows you to easily switch report attributes on and off in  a
  11488.     document that is part of a bigger application. See "Chapter 22:
  11489.     Generating Reports" for more information on reports.
  11490.  
  11491.     Set Help Context
  11492.  
  11493.          @HELP(context) - Set the context to context which is the page
  11494.          number of the document help file. This page is displayed in the
  11495.          Document Help window when (F2) is pressed. See "Chapter 24: More
  11496.          About Surefire Documents" for complete information on using
  11497.          document help.
  11498.  
  11499.  
  11500.  
  11501.  
  11502.  
  11503.  
  11504.  
  11505.                           Copyright (c) 1993 Piaf, Inc.
  11506.  
  11507.     Surefire S2.0 User's Guide                                       Page 196
  11508.  
  11509.     Present a Document
  11510.  
  11511.          @PRESENT(msecs) - Show each page of the current document for a
  11512.          duration of msecs. After the last page is displayed the cycle
  11513.          begins again from page 1. Use this to present a "slide show" of the
  11514.          pages in your document. Usually, the document will have pages that
  11515.          are the size of the screen. If you want to pause the presentation
  11516.          on a specific screen, press (Spacebar). The automatic presentation
  11517.          will continue when you press (Spacebar) again. The presentation
  11518.          will last until you press (Esc). Then, you will be able to move
  11519.          through the document normally with the cursor movement and paging
  11520.          keys.
  11521.  
  11522.          Example:  Have a document with 5 screen size pages.
  11523.                    @PRESENT(500) will display page 1 for 1/2 a second, then
  11524.                    page 2 for 1/2 a second, page3, page4, up through page 5
  11525.                    and then repeat at page 1.
  11526.  
  11527.          You can use the @PRESENT function to do screen animation. Just set
  11528.     up your document as a series of screen pages that change in a certain
  11529.     way.  Then use @PRESENT with a small value for msecs.
  11530.     Database Statistical Functions
  11531.  
  11532.          All of the following functions, except @DSUBCOUNT, are equivalent
  11533.     to the non-database statistical functions.  The difference is that they
  11534.     operate on the values of the specified field for all the records
  11535.     retrieved by the current query.
  11536.  
  11537.          Note:   These functions may only be used if a document has report
  11538.     attributes specified.
  11539.  
  11540.          For the examples with the following functions, the database records
  11541.     retrieved have these fields and values:
  11542.  
  11543.          Group     Age
  11544.          A         50
  11545.          B         60
  11546.          C         35
  11547.          A         12
  11548.          C         46
  11549.          B         21
  11550.  
  11551.  
  11552.  
  11553.  
  11554.  
  11555.  
  11556.  
  11557.  
  11558.  
  11559.  
  11560.  
  11561.  
  11562.  
  11563.  
  11564.                           Copyright (c) 1993 Piaf, Inc.
  11565.  
  11566.     Surefire S2.0 User's Guide                                       Page 197
  11567.  
  11568.     @DAVG(field) -     Average value of field over retrieved records.
  11569.  
  11570.          Example:  @DAVG(age) returns 37.33
  11571.  
  11572.     @DMAX(field) - Maximum value of field over retrieved records.
  11573.  
  11574.          Example:  @DMAX(age) returns 60.
  11575.  
  11576.     @DMIN(field) -      Minimum value of field over retrieved records.
  11577.  
  11578.          Example:  @DMIN(age) returns 12.
  11579.  
  11580.     @DSUM(field) - Sum of values of field over retrieved records.
  11581.  
  11582.          Example:  @DSUM(age) returns 224.
  11583.  
  11584.     @DCOUNT -      Total number of records found for the current query.
  11585.  
  11586.          Example:  We're sorting these records by group. After displaying
  11587.          all the records, @DCOUNT  returns 6.
  11588.  
  11589.     @DSUBCOUNT - Count of records retrieved so far.
  11590.  
  11591.          Example:  We're sorting these records by group. After displaying
  11592.          the records for group A, @DSUBCOUNT would return 2.
  11593.  
  11594.  
  11595.     Database Searching Functions
  11596.  
  11597.          The following group of functions are used for controlling data base
  11598.     searching and updating. Like control functions, these functions are used
  11599.     in button fields and in field commands that are set for immediate
  11600.     execution (i.e. Execute on Enter).
  11601.  
  11602.     Set Query Conditions
  11603.  
  11604.          @CNDX("docname","query", docfield1, docfield2, " qfield") - for the
  11605.     specified query defined in the specified document docname, set the first
  11606.     condition value of the query line whose field is qfield to the value in
  11607.     docfield1.  Set the second condition (if any) to the value in docfield2.
  11608.     Both docfield1 and docfield2  may refer to fields in the current
  11609.     document. They may also be quoted text strings or numeric constants. In
  11610.     specifying docfield1 and docfield2 you can mix a numeric constant with
  11611.     numeric field reference or a text string with a text field reference.
  11612.     Docfield2  may be left out.
  11613.  
  11614.          @CNDX - without arguments, this function clears all query
  11615.     conditions set at the current document level.
  11616.  
  11617.          See the section "Using Database Searching Functions" in  "Chapter
  11618.     21: Advanced Database Topics" for a complete description of the use of
  11619.     this function.
  11620.  
  11621.  
  11622.  
  11623.                           Copyright (c) 1993 Piaf, Inc.
  11624.  
  11625.     Surefire S2.0 User's Guide                                       Page 198
  11626.  
  11627.     Execute a Query
  11628.  
  11629.          @QUERY("query") - The query with the specified name previously
  11630.     defined for the current document is executed. Use any conditions
  11631.     specified with @CNDX for this query.
  11632.  
  11633.          Example:  @QUERY("cities") will start a search in the current
  11634.          document using the named query "cities".
  11635.  
  11636.     Join a Document
  11637.  
  11638.          @JOIN("document", "query") Go to the specified document and execute
  11639.     the query with the specified name. Use any conditions specified with
  11640.     @CNDX for this query.
  11641.  
  11642.          Example:  @JOIN("trails", "colorado") will display the document
  11643.          trails and execute the named query colorado.
  11644.  
  11645.     Start a Search
  11646.  
  11647.          @SEARCH - Initiate a search based on the value of the current field
  11648.     in the current document. This is useful after the @GODOC, @FPASTE,
  11649.     @GOFIELD command combination. This function is equivalent to pressing
  11650.     (ALT+S) while the cursor is on a field.
  11651.  
  11652.     Update Record
  11653.  
  11654.          @UPDATE - Update the current database record with the values
  11655.     currently in the fields. This function is equivalent to pressing (ALT+U)
  11656.     after a database search has been done.
  11657.  
  11658.  
  11659.  
  11660.  
  11661.  
  11662.  
  11663.  
  11664.  
  11665.  
  11666.  
  11667.  
  11668.  
  11669.  
  11670.  
  11671.  
  11672.  
  11673.  
  11674.  
  11675.  
  11676.  
  11677.  
  11678.  
  11679.  
  11680.  
  11681.  
  11682.                           Copyright (c) 1993 Piaf, Inc.
  11683.  
  11684.     Surefire S2.0 User's Guide                                       Page 199
  11685.  
  11686.     Logical Value Functions
  11687.  
  11688.          A logical value can also be explicitly defined by using the
  11689.     functions @TRUE and @FALSE.  These are in fact equivalent to using the
  11690.     numbers 1 for True and 0 for False, but are much more readable.
  11691.  
  11692.          @TRUE - equivalent to the value 1.
  11693.          @FALSE - equivalent to the value 0.
  11694.  
  11695.     Logical Condition Function
  11696.  
  11697.          A logical condition does something different based on whether the
  11698.     given logical expression is true or false. In other words you may want
  11699.     to take some action or do a calculation only if something else is True
  11700.     or False. To do this there is a special function:
  11701.  
  11702.          @IF(condx, true, false)
  11703.  
  11704.          The @IF function uses a logical expression for its first argument,
  11705.     condx. If the condition condx evaluates to TRUE, then the command
  11706.     specified as the argument true is executed. Otherwise the condition must
  11707.     be FALSE, so the command specified as the argument false is executed.
  11708.  
  11709.          Example:  Let's say you have cells A1 that contains your income and
  11710.          B1 will have the tax you owe. And you have a simple tax rate of
  11711.          10%. To make sure a negative tax is never calculated, use the
  11712.          following field command in cell B1.
  11713.  
  11714.          @IF( A1 >= 0, A1 * .10, 0 ).
  11715.  
  11716.          This will take the value in cell A1 and see whether it is greater
  11717.          than 0.  If it is, the value is multiplied by .10, (or 10 percent).
  11718.          Otherwise the result is set to the third argument, zero.
  11719.  
  11720.          If cell A1 has the value $400, B1 will have the value $40.
  11721.          If cell A1 has the value ($500), that is a loss of $500, B1 will
  11722.          have the value $0.
  11723.  
  11724.  
  11725.          Using the @IF function, you can test logical field values that
  11726.     correspond to a person's Yes/No responses to questions. From this you
  11727.     determine which page or document of a "script" application is
  11728.     appropriate to that person's answer. Once there, after an @GOPAGE or
  11729.     @GODOC, the user can answer more questions, look at the result of a
  11730.     database search or look at a chart of information, for example.
  11731.  
  11732.  
  11733.  
  11734.  
  11735.  
  11736.  
  11737.  
  11738.  
  11739.  
  11740.  
  11741.                           Copyright (c) 1993 Piaf, Inc.
  11742.  
  11743.           SUREFIRE                     YES!  PLEASE SEND ME SUREFIRE!
  11744.          Order Form
  11745.                                  Name:____________________________________
  11746.  
  11747.  Mail Orders:                 Company:____________________________________
  11748.   Piaf, Inc.
  11749.   3918 Orchard Court          Address:____________________________________
  11750.   Boulder, CO 80304-1023
  11751.                                       ____________________________________
  11752.  Phone Orders:
  11753.   303 786-8222  (24 hours)       City:____________________________________
  11754.  
  11755.                         State/Country:____________________________________
  11756.  
  11757.                       Zip/Postal Code:____________________________________
  11758.  
  11759.  Order Date:____________        Phone:____________________________________
  11760.  
  11761.               Item                    Quantity   Price     Total
  11762.  
  11763.  Full Surefire Package -               ______     $79     $_______________
  11764.     Includes: 475 page bound User's
  11765.     Guide, 6 Months Phone Support,
  11766.     Registered Disks (with Examples,
  11767.     Spell Checker, memory up to 8Mb)
  11768.  
  11769.  Registered Disks Only -               ______     $39     $_______________
  11770.     Registered Disks (with Examples,
  11771.     Spell Checker, memory up to 8Mb,
  11772.     Tech support by mail or e-mail)
  11773.  
  11774.  Full Surefire Package with Contacts - ______     $99     $_______________
  11775.     Includes Full Surefire Package
  11776.     PLUS a Full Contact Manager with
  11777.     separate 100 page User's Guide,
  11778.     Quick Reference card. ($169 Retail)
  11779.  
  11780.  Shipping and Handling (per unit) -                       $_______________
  11781.     Full Package   Disks Only
  11782.       $  6            $  4     U.S.
  11783.       $  8            $  6     Canada
  11784.       $ 25            $ 12     Overseas
  11785.  
  11786.                    Colorado Sales Tax: (Add 3%)           $_______________
  11787.  
  11788.                                Total Amount (US Dollars): $_______________
  11789.  
  11790.                             Disk Size: ____5-1/4"   ____3-1/2"
  11791.  
  11792.    Payment must be via     VISA/MC No: ___________________________________
  11793.    Check, Money order,
  11794.    VISA or MasterCard.        Expires: ___________________________________
  11795.  
  11796.                             Signature: ___________________________________
  11797.      THANK YOU
  11798.    FOR YOUR ORDER!     I learned about
  11799.                         Surefire from: ___________________________________
  11800.  
  11801.          (Please write your comments and suggestions on reverse!)
  11802.